-
Notifications
You must be signed in to change notification settings - Fork 588
Open
Description
Problem Statement
When creating cron monitors via sentry_monitor(), there's no way to assign the monitor to a team. Currently, team ownership must be set manually through the Sentry UI or via a separate API call after the monitor is created.
Solution Brainstorm
Add support for team assignment in the MonitorConfig TypedDict so monitors can be assigned to teams programmatically:
monitor_config = {
"schedule": {"type": "crontab", "value": "0 7 * * *"},
"checkin_margin": 5,
"max_runtime": 30,
"timezone": "UTC",
"team": "my-team-slug" # or team_id
}
with sentry_monitor(
monitor_slug="my-cron-job",
monitor_config=monitor_config
):
execute_job()
For teams managing a lot of cron jobs (and multiple teams that all own different cron jobs) auto-assigning monitors to the right team during creation improves:
- Discoverability (team members see their jobs automatically)
- Ownership clarity and triaging of alerts
- Automation (no manual UI steps post-deployment)
Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Projects
Status
No status