sentry-ruby icon indicating copy to clipboard operation
sentry-ruby copied to clipboard

Cron monitors slug prefix

Open ixti opened this issue 1 year ago • 4 comments

Cron monitor slugs are global per-organization. Thus, it will be very nice to be able to specify slugs prefix. In addition, it would be nice to keep sidekiq-scheduler's cron name as is instead of using slug as the name.

Why do you think it's beneficial to most of the users

  • Reduce possible slug collisions
  • Make UI more readable

Possible implementation

Sentry.init do |c|
  c.crons.slug_prefix = "myapp-"
end

Alternatively, if there will be a way to provide custom slugifier lambda - that will be enough. Either way it would be nice to keep original name as the monitor's name.

ixti avatar Mar 23 '24 04:03 ixti

hey @ixti yea prefixes make sense, feel free to PR if you want it quicker otherwise I'll try to get to it sometime soon.

re: slug logic, the server decided to slugify anyway so it won't matter if we expose custom slugify logic on the SDK.

Sorry this is just a design choice we have to live with for now but I can pass on the feedback to our Crons team if they want to reconsider this.

sl0thentr0py avatar Mar 25 '24 13:03 sl0thentr0py

I agree that the name of the job should set the name of the monitor (rather than the slug). The slug is much less readable!

I opened #2290 specifically for setting the name.

sethherr avatar Apr 05 '24 21:04 sethherr

re: slug logic, the server decided to slugify anyway so it won't matter if we expose custom slugify logic on the SDK.

If I read Python correctly, it only slugifies when slug is not presented

ixti avatar Apr 05 '24 21:04 ixti

Sorry, a little late to the party here, but cron monitors are unique to the project now. We recently changed this: https://github.com/getsentry/sentry/issues/66615

evanpurkhiser avatar Apr 08 '24 15:04 evanpurkhiser

We've decided to stop using cron monitors - by some reason, cron monitors with sidekiq-scheduler only cause unactionable noise for us. So feel free to close this one.

ixti avatar Jul 23 '24 16:07 ixti