-
-
Notifications
You must be signed in to change notification settings - Fork 520
Closed
Labels
Description
I have a question regarding the Ruby SDK. In the documentation, it states
# slug defaults to the job class name
sentry_monitor_check_ins slug: 'custom_slug'Currently it appears that the slug parameter is always required, since Ruby class names can contain punctuation (::) and will have capital letters.
e.g.
SuperFancy::PrivateGroups::SpecialOrganizations::ScheduleOutreachWorkerIn 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.
[1] pry(main)> e=SuperFancy::PrivateGroups::SpecialOrganizations::ScheduleOutreachWorker.new
=> #<SuperFancy::PrivateGroups::SpecialOrganizations::ScheduleOutreachWorker:0x00007f13c7a366f0>
[2] pry(main)> e.class.name.parameterize
=> "superfancy-specialgroups-specialorganizations-scheduleoutreachworker"
[3] pry(main)> e.class.name.parameterize.size
=> 68This 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)
maris-at-levelpathschneiderderek and nimylian
Metadata
Metadata
Assignees
Labels
Projects
Status
No status