-
-
Notifications
You must be signed in to change notification settings - Fork 513
Improve slug generation for crons #2138
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
Comments
One concern I have is that it appears slugs can be duplicated across environments -- could/should the gem prefix the Rails environment to the slug? |
Would it be better to try and omit pieces of the default slug if it runs out of 50 characters, or would it be more beneficial to omit the middle part of the longer slugs in the Dashboard UI? I would assume Dashboard will have to deal with many things that are too long to display, eventually? |
thanks for the feedback everyone, I'll think about a good way to do this when I have some time to fix this. |
ok so I will parameterize and truncate from the beginning, I think that's more useful since the job name stays at the end |
@swanson the environment is already sent as part of the check-in in the event payload, so they will already be categorized correctly. |
`sidekiq-scheduler` allows to use a class name as a schedule name directly as follows. ``` Namspeced::CancelAbandonedOrders: cron: '0 */5 * * * *' ``` In this case, a slug is shown as `namspecedcancelabandonedorders` on Sentry. I think this isn't good for readability. This PR converts `::` to `-` as well as the cron default behavior of Crons mixin. Related with: getsentry#2138.
`sidekiq-scheduler` allows to use a class name as a schedule name directly as follows. ``` Namspeced::CancelAbandonedOrders: cron: '0 */5 * * * *' ``` In this case, a slug is shown as `namspecedcancelabandonedorders` on Sentry. I think this isn't good for readability. This PR converts `::` to `-` as well as the cron default behavior of Crons mixin. Related with: getsentry#2138.
`sidekiq-scheduler` allows to use a class name as a schedule name directly as follows. ``` Namspeced::CancelAbandonedOrders: cron: '0 */5 * * * *' ``` In this case, a slug is shown as `namspecedcancelabandonedorders` on Sentry. I think this isn't good for readability. This PR converts `::` to `-` as well as the cron default behavior of Crons mixin. Related with: getsentry#2138.
`sidekiq-scheduler` allows to use a class name as a schedule name directly as follows. ``` Namspeced::CancelAbandonedOrders: cron: '0 */5 * * * *' ``` In this case, a slug is shown as `namspecedcancelabandonedorders` on Sentry. I think this isn't good for readability. This PR converts `::` to `-` as well as the cron default behavior of Crons mixin. Related with: getsentry#2138.
`sidekiq-scheduler` allows to use a class name as a schedule name directly as follows. ``` Namspeced::CancelAbandonedOrders: cron: '0 */5 * * * *' ``` In this case, a slug is shown as `namspecedcancelabandonedorders` on Sentry. I think this isn't good for readability. This PR converts `::` to `-` as well as the cron default behavior of Crons mixin. Related with: #2138.
I have a question regarding the Ruby SDK. In the documentation, it states
Currently it appears that the
slug
parameter is always required, since Ruby class names can contain punctuation (::
) and will have capital letters.e.g.
In the code, I would suggest that they use
self.class.name.parameterize
as the default, which will downcase the class name and replace the double colons with a dash.This example demonstrates the other issue that we're running into, which is one of length. Since the Dashboard UI constrains the value to 50 characters (this not mentioned in the documentation), it appears the
slug
parameter will still have to be used.Are these assumptions correct?
Originally posted by @nimylian in getsentry/sentry#42283 (comment)
The text was updated successfully, but these errors were encountered: