-
Notifications
You must be signed in to change notification settings - Fork 554
Description
How do you use Sentry?
Sentry Saas (sentry.io)
Version
2.28.0
Steps to Reproduce
Helping a user in this Zendesk ticket (last several responses): https://sentry.zendesk.com/agent/tickets/152175
It seems like the celery integration used with the Redbeat scheduler is creating two in-progress check in events at the scheduled time. The worker only sends 1 OK check-in event leading to the other in-progress event to timeout. I was able to reproduce this with a task that runs every minute.
Using the celery beat scheduler instead of redbeat works as expected.
My sentry settings -
@signals.beat_init.connect
@signals.celeryd_init.connect
def init_sentry(**_kwargs):
sentry_sdk.init(
dsn="<DSN>",
send_default_pii=True,
integrations=[CeleryIntegration(
monitor_beat_tasks=True,
)],
debug=True,
)
Run commands -
celery -A tasks worker --loglevel=INFO
celery -A tasks beat --scheduler redbeat.RedBeatScheduler --loglevel=INFO
When the task starts, I get 2 monitor check ins per every time the ta 8752 sk is run (task runs 2 times in screenshot) in beat terminal -

In the worker terminal, I get 1 check in per task (as expected) -

In the UI, it looks like this, where the In Progress check ins will then timeout after the set threshold -

Expected Result
Sends only 1 in progress event when the task begins.
Expect behavior to match celery beat scheduler
Actual Result
Sends 2 in progress events when the task begins.
Metadata
Metadata
Assignees
Type
Projects
Status