Skip to content

docs(crons): Add arq setup for Python - #20056

Merged
sentrivana merged 3 commits into
masterfrom
danf/python-arq-crons-docs
Oct 22, 2026
Merged

sentrivana merged 3 commits into
masterfrom
danf/python-arq-crons-docs

Conversation

@wedamija

@wedamija wedamija commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

DESCRIBE YOUR PR

Adds an arq section to the Python Crons setup page: turning on monitor_cron_jobs, how the slug is picked, and which cron jobs are monitored.

SDK PR: getsentry/sentry-python#8051

Merge after the SDK release that includes it.

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.
Select exactly one option. For deadlines, replace YYYY-MM-DD with the due date. You can update this information later by editing the PR description.

  • Urgent deadline (GA date, etc.): YYYY-MM-DD
  • Other deadline: YYYY-MM-DD
  • No deadline: Not urgent, can wait up to 1 week+

Co-Authored-By: Claude <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sentry-docs Ready Ready Preview Oct 21, 2026 4:27pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
develop-docs Ignored Ignored Preview Oct 21, 2026 4:27pm UTC

Request Review

@wedamija wedamija mentioned this pull request Oct 17, 2026
1 of 3 tasks
@github-actions github-actions Bot added the Priority: Needs Triage The PR description is missing valid priority information label Oct 17, 2026
wedamija added a commit to getsentry/sentry-python that referenced this pull request Oct 20, 2026
Part of a series adding automatic Crons monitoring for the most-used job
schedulers in each SDK. Check-ins for a monitor that doesn't exist yet
are dropped, so today each monitor has to be created by hand with its
schedule copied from the code. Sending the job's schedule as the monitor
config lets Sentry create the monitor and keep it in sync.

This adds `monitor_cron_jobs` to `ArqIntegration`, matching Celery's
`monitor_beat_tasks`. When it's on, each `cron(...)` job sends check-ins
with its schedule in the worker's timezone, so Sentry creates the
monitor on the first run. The slug is the job name without arq's `cron:`
prefix. It's off by default.

```python
sentry_sdk.init(
    integrations=[ArqIntegration(monitor_cron_jobs=True, exclude_cron_jobs=["cleanup"])],
)
```

Jobs check in without a config when Crons can't express the schedule: a
`second` other than 0, both `day` and `weekday` set, or a UTC offset
that isn't a whole number of hours. Before arq 0.25, the config is only
sent when the system timezone is UTC.

Docs: getsentry/sentry-docs#20056
Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added Priority: Normal Docs review has no urgent deadline and removed Priority: Needs Triage The PR description is missing valid priority information labels Oct 20, 2026
Comment thread platform-includes/crons/setup/python.mdx Outdated
@wedamija
wedamija marked this pull request as ready for review October 21, 2026 16:12
@cursor

cursor Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

The plan checks page loads for the changed Crons setup page, client errors on that page, and MDX-not-found logs. An issue escalates when those errors appear or page loads fall to zero.

Monitoring in production

Services: sentry-docs.

Mention @change-monitor in a comment to update the plan.

Plan

What changed

Visitors to /platforms/python/crons/ now see an arq setup section. The section shows how to set monitor_cron_jobs, how the slug is picked, and which jobs are skipped.
This change is live after sentry-docs deploys to production. The include file ships only on that Python Crons page.

Risk

Bad MDX can 404 the whole Python Crons page. Users then lose the Celery Beat link and Job Monitoring copy too.
New Alert markup or extra code blocks can throw client errors on that page. The blast stays on this page.
Other platform Crons pages do not include this file.

Intended effect

This change is a docs edit. Telemetry cannot show the new arq section.
No counter increments when that heading renders. The executor cannot confirm intended effect from metrics.
absent looks the same as unknown. No metric can prove the heading is missing.

Regression watch

This page has low traffic. Sibling Celery Beat Crons loads were 3 in the same window. A drop of a few loads is noise. A fall to 0 while platform page loads stay near 8790 is a regression.
If error rate rises, check the logs for MDX file not found at runtime on platforms/python/crons.

Signal Baseline Window Rule Source
docs.page.load with path:*platforms/python/crons* 9 loads. Share 0.10% of 8790 page_type:platforms loads 2026-10-20T16:27:05Z to 2026-10-21T16:27:05Z Hold above 0. Do not fall to 0 while platform loads stay near 8790 Sentry org sentry project docs
Client errors transaction:*python/crons* 0 events. Also 0 for transaction:/platforms/python/crons/ 2026-10-14T16:27:05Z to 2026-10-21T16:27:05Z Hold at 0 Sentry org sentry project docs errors
Logs message:"*MDX file not found at runtime*" 0 events 2026-10-20T16:27:05Z to 2026-10-21T16:27:05Z Hold at 0 Sentry org sentry project docs logs

Not observable

The rendered HTML does not emit a signal for the arq heading.
The same hours a day earlier for docs.page.load were not measured. The 7d metrics query timed out.
Pageload span p95 for this URL is not available. transaction:/platforms/python/crons returned 0 spans. A wildcard traces query timed out.
docs.page.not_found stores only platforms/python. It cannot isolate this page.

Get Slack DMs about this change: cursor.com/automations/rollouts

@linear-code

linear-code Bot commented Oct 21, 2026

Copy link
Copy Markdown

PY-117

sentrivana pushed a commit to getsentry/sentry-python that referenced this pull request Oct 22, 2026
Part of a series adding automatic Crons monitoring for the most-used job
schedulers in each SDK. Check-ins for a monitor that doesn't exist yet
are dropped, so today each monitor has to be created by hand with its
schedule copied from the code. Sending the job's schedule as the monitor
config lets Sentry create the monitor and keep it in sync.

This is a quick fix to keep the arq integration behaviour in line with
how other integrations work. Sorry for the churn!

Follow-up to #8051. Cron jobs whose schedule Crons can't express are no
longer monitored, instead of checking in without a config. This matches
Celery beat, and the Huey and RQ integrations from #8052 and #8053.

Docs: getsentry/sentry-docs#20056

Co-authored-by: Claude <noreply@anthropic.com>
@sentrivana

Copy link
Copy Markdown
Contributor

SDK release is coming out in a few mins, merging.

@sentrivana
sentrivana merged commit 57dd396 into master Oct 22, 2026
27 of 28 checks passed
@sentrivana
sentrivana deleted the danf/python-arq-crons-docs branch October 22, 2026 07:50
sentrivana added a commit that referenced this pull request Oct 22, 2026
## DESCRIBE YOUR PR

Adds a Huey section to the Python Crons setup page: turning on
`monitor_periodic_tasks`, how the slug is picked, and which periodic
tasks are monitored.

SDK PR: getsentry/sentry-python#8052

Stacked on #20056.

Merge after the SDK release that includes it.

## IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs
to go live.
Select exactly one option. For deadlines, replace `YYYY-MM-DD` with the
due date. You can update this information later by editing the PR
description.

- [ ] Urgent deadline (GA date, etc.): YYYY-MM-DD
- [ ] Other deadline: YYYY-MM-DD
- [x] No deadline: Not urgent, can wait up to 1 week+

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Ivana Kellyer <ivana.kellyer@sentry.io>

This branch was successfully deployed

1 active deployment
Preview – sentry-docs — acdbba10 Deployed Oct 21, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: Normal Docs review has no urgent deadline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants