Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/platforms/python/crons/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ monitor_config = {
# It'll take `recovery_threshold` OK check-ins to resolve
# an issue
"recovery_threshold": 5,
# Assign ownership to a team or user (format: "team:6" or "user:51")
"owner": "team:6",
Comment thread
sentry[bot] marked this conversation as resolved.
}

@monitor(monitor_slug='<monitor-slug>', monitor_config=monitor_config)
Expand Down
14 changes: 14 additions & 0 deletions docs/platforms/python/integrations/celery/crons.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -155,3 +155,17 @@ def init_sentry(**kwargs):
def tell_the_world(msg):
print(msg)
```

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
Copy Markdown
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
Copy Markdown
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!

Loading