-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Cron monitor slug truncates if Celerybeat periodic task name contains a 2nd ":" #77692
Comments
@peterfarrell, could you please share a minimal reproduction? I tried to reproduce your error with the code snippet provided below, but got the following monitor slug in Sentry, which was not truncated: In any case, this problem likely does not originate from the SDK, since the SDK appears to send As a workaround, I would suggest setting the task name to a valid monitor slug. Valid monitor slugs can include lowercase letters, numbers, dashes, and underscores. Setting the task name to a valid monitor slug is also probably generally a more robust solution. |
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you remove the label "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
@szokeasaurusrex I can't repro the slug truncation in the SDK just as you found. It appears it's happening upstream which is impacting the auto-instrumentation with Celery Beat. |
This is about the backend slugification logic so I will transfer this issue to the main sentry repo and tag the Crons team. |
Assigning to @getsentry/support for routing ⏲️ |
Routing to @getsentry/product-owners-crons for triage ⏲️ |
This seems easy enough to fix - we just need to fix the slug logic. We'll need to have a backwards compatibility shim that uses the old logic and matches to a monitor that has that slug if it exists. We might be able to backfill too, but it's a little risky |
How do you use Sentry?
Sentry Saas (sentry.io)
Version
2.13.0
Steps to Reproduce
We are using the automatic Celerybeat integration. We are seeing odd slug names being generated by Sentry.
We have several periodic tasks that we have setup with names like:
The slugs that get registered in Sentry are:
office-send-daily-birthdayanniversary-email-8
office-send-daily-birthdayanniversary-email-8
office-send-daily-birthdayanniversary-email-9
office-send-daily-birthdayanniversary-email-9
Initially, we thought that the slug name had an undisclosed maximum character length however we discovered that occurs if there is a 2nd
:
(colon) in the name and it truncates the slug after that.This had led to some strange results in Cron Monitoring where 2 separate check-ins are made on a monitor configured for a single time:
Expected Result
Expected unique slugs that did not truncate.
Actual Result
Two separate periodic tasks with unique names getting the same slug name due to the truncation.
The text was updated successfully, but these errors were encountered: