Skip to content

docs(python): Add owner field examples to crons documentation#16825

Merged
ericapisani merged 2 commits intogetsentry:masterfrom
julwhitney13:sentry-python-5609-update-docs
Mar 10, 2026
Merged

docs(python): Add owner field examples to crons documentation#16825
ericapisani merged 2 commits intogetsentry:masterfrom
julwhitney13:sentry-python-5609-update-docs

Conversation

@julwhitney13
Copy link
Contributor

DESCRIBE YOUR PR

Add documentation for the new owner field in Python cron monitor configuration. This field allows developers to assign monitor ownership to teams or users
(format: "team:6" or "user:51") for improved discoverability and routing within Sentry organizations.

Related SDK PR: getsentry/sentry-python#5609

Changes:

  • Updated docs/platforms/python/crons/index.mdx to include owner field in monitor_config example
  • Updated docs/platforms/python/integrations/celery/crons.mdx to show usage with Celery tasks

IS YOUR CHANGE URGENT?

  • None: Not urgent, can wait up to 1 week+

SLA

Reviewers: @getsentry/docs (or specific docs team member if you know them)

PRE-MERGE CHECKLIST

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

LEGAL BOILERPLATE

I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

@vercel
Copy link

vercel bot commented Mar 6, 2026

@julwhitney13 is attempting to deploy a commit to the Sentry Team on Vercel.

A member of the Team first needs to authorize it.

@ericapisani ericapisani self-assigned this Mar 9, 2026
@vercel
Copy link

vercel bot commented Mar 9, 2026

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

Project Deployment Actions Updated (UTC)
sentry-docs Ready Ready Preview, Comment Mar 10, 2026 3:50pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
develop-docs Ignored Ignored Preview Mar 10, 2026 3:50pm

Request Review

Copy link
Member

@ericapisani ericapisani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating the docs alongside your changes!

I have one cleanup request, but otherwise this is looking great.

Comment on lines +159 to +171
You can also pass additional monitor configuration, including ownership:

```python {diff} {filename:tasks.py}
+monitor_config = {
+ "schedule": {"type": "crontab", "value": "0 0 * * *"},
+ "owner": "team:6",
+}

@app.task
+@sentry_sdk.monitor(monitor_slug='<monitor-slug>', monitor_config=monitor_config)
def tell_the_world(msg):
print(msg)
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the information about additional monitor configuration is already available in the "Configuring Cron Monitors" section that you've edited above, we don't need to add these changes here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point! fixed!

ericapisani added a commit to getsentry/sentry-python that referenced this pull request Mar 10, 2026
### Summary
Adds support for the `owner` field in `MonitorConfig` to enable monitor
ownership assignment to teams or users. This allows developers to
organize and route cron monitors within their organization without
needing to use the Sentry REST API separately.

### Description
- Adds `owner` field (optional, format: `"team:6"` or `"user:51"`) to
`MonitorConfig` TypedDict
- Adds test verifying `owner` field is properly serialized in check-in
payload
- [Related PRs in
sentry-docs](getsentry/sentry-docs#16825):
  - Update Python crons documentation with owner field examples
  - Update Celery crons documentation with owner field example

#### Issues
* resolves: #5609 
* resolves:
[PY-2126](https://linear.app/getsentry/issue/PY-2126/support-team-assignment-for-cron-monitors-via-sdk)

#### Reminders
- Please add tests to validate your changes, and lint your code using
`tox -e linters`.
- Add GH Issue ID _&_ Linear ID (if applicable)
- PR title should use [conventional
commit](https://develop.sentry.dev/engineering-practices/commit-messages/#type)
style (`feat:`, `fix:`, `ref:`, `meta:`)
- For external contributors:
[CONTRIBUTING.md](https://github.com/getsentry/sentry-python/blob/master/CONTRIBUTING.md),
[Sentry SDK development docs](https://develop.sentry.dev/sdk/), [Discord
community](https://discord.gg/Ww9hbqr)

Co-authored-by: Erica Pisani <pisani.erica@gmail.com>
Copy link
Member

@ericapisani ericapisani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! 🚀 Thank you again!

@ericapisani ericapisani enabled auto-merge (squash) March 10, 2026 15:39
@ericapisani ericapisani merged commit 23b566b into getsentry:master Mar 10, 2026
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants