Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Sentry Crons to Celery Beat #1935

Merged
merged 14 commits into from Mar 16, 2023

Conversation

antonpirker
Copy link
Member

@antonpirker antonpirker commented Mar 1, 2023

This adds a decorator @sentry.monitor that can be attached to Celery tasks. When the celery tasks are run, a check-in for Sentry Crons is created and also the status of the check-in is set when the tasks fails for finishes.

Fixes #1932

sentry_sdk/crons.py Outdated Show resolved Hide resolved
@evanpurkhiser
Copy link
Member

Let's rename usages of monitor_id to monitor_slug

@antonpirker
Copy link
Member Author

@evanpurkhiser when will the monitor_slug updated be deployed to production?

@antonpirker antonpirker marked this pull request as ready for review March 13, 2023 13:40
reraise(*exc_info)

duration = nanosecond_time() - start_timestamp
capture_checkin(
Copy link
Member

Choose a reason for hiding this comment

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

could probably combine both in finally?

@antonpirker antonpirker merged commit f7b0684 into master Mar 16, 2023
228 checks passed
@antonpirker antonpirker deleted the antonpirker/1932-support-for-sentry-crons branch March 16, 2023 15:07
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.

Add support for Sentry Crons to Celery Beat
3 participants