Skip to content

feat(crons): monitor slug underscore format with mashed default - #2750

Open
amkisko wants to merge 3 commits into
getsentry:masterfrom
amkisko:patch/cron-monitor-slug-formatting
Open

amkisko wants to merge 3 commits into
getsentry:masterfrom
amkisko:patch/cron-monitor-slug-formatting

Conversation

@amkisko

@amkisko amkisko commented Oct 16, 2025 •

Copy link
Copy Markdown

Summary

Aligns default cron monitor slug derivation with #3215, rebased onto current master (includes Sentry::Cron::Slug from #3200).

  • Class-name defaults can use Rails-style underscore word breaks (HappyWorkerWithCron → happy_worker_with_cron)
  • Long :underscore slugs keep a SHA256 prefix of the dropped part plus a readable tail (≤ 50 chars)
  • config.cron.monitor_slug_format selects :mashed (default) or :underscore for derived slugs only
  • Explicit sentry_monitor_check_ins(slug: ...) still wins; one format per process (no dual-emit)
  • Shared helpers live on Sentry::Cron::Slug; Slug.from for job keys is unchanged
  • No CHANGELOG.md edit (generated at release)
Sentry.init do |config|
  config.cron.monitor_slug_format = :mashed      # default during transition
  # config.cron.monitor_slug_format = :underscore
end

Test plan

  • sentry-ruby cron slug + monitor_check_ins specs
  • RuboCop on touched files
  • sentry-sidekiq sidekiq + sidekiq-scheduler specs (Redis)
  • sentry-rails good_job + good_job_cron + isolated good_job_cron specs (Postgres)
  • CI on this PR

fixes #3215
fixes #2594

cursor[bot]

This comment was marked as outdated.

@amkisko amkisko mentioned this pull request Oct 16, 2025
@amkisko

amkisko commented Dec 4, 2025

Copy link
Copy Markdown
Author

Latest mainstream merged

@amkisko

amkisko commented Nov 18, 2026

Copy link
Copy Markdown
Author

Tracking issue for this change (including slug format selection for transition): #3215

@solnic solnic left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for helping out with Good Job. Please remove CHANGELOG.md change as we generate changelog entries automatically (and optionally refine them manually) during the release process.

@amkisko

amkisko commented Nov 18, 2026

Copy link
Copy Markdown
Author

Thanks for helping out with Good Job. Please remove CHANGELOG.md change as we generate changelog entries automatically (and optionally refine them manually) during the release process.

Hi! Thank you too! I will align this PR with issue i created today and get rid of CHANGELOG.md entries.

@amkisko
amkisko force-pushed the patch/cron-monitor-slug-formatting branch from 779b1da to 62bd057 Compare November 18, 2026 10:57
@amkisko
amkisko requested a review from a team as a code owner November 18, 2026 10:57
@amkisko amkisko changed the title feat(monitor_check_ins): improve cron monitor slug readability with better formatting and hashing feat(crons): monitor slug underscore format with legacy default Nov 18, 2026
@amkisko
amkisko force-pushed the patch/cron-monitor-slug-formatting branch 2 times, most recently from f6e46ea to 934e30b Compare November 18, 2026 10:59
@amkisko amkisko changed the title feat(crons): monitor slug underscore format with legacy default feat(crons): monitor slug underscore format with mashed default Nov 18, 2026
@amkisko

amkisko commented Nov 18, 2026

Copy link
Copy Markdown
Author

@solnic PR is ready.

@solnic solnic left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rebase onto latest master and once CI is green we could merge this in.

Rebase onto current master and align with getsentry#3215. Default class-name
slugs stay legacy; `:underscore` adds word breaks and hash truncation via
shared `Sentry::Cron::Slug` helpers. No CHANGELOG edit.
Name describes the mashed CamelCase shape, not transition status.
@amkisko
amkisko force-pushed the patch/cron-monitor-slug-formatting branch from 996dd01 to 88cdd8e Compare December 3, 2026 15:47
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Dec 3, 2026
@github-actions

github-actions Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

PR risk: medium

For commit d276888.

Main concerns: public contract, reach, data sent to Sentry.

This label is a hint for reviewers, not an approval.

@amkisko

amkisko commented Dec 3, 2026

Copy link
Copy Markdown
Author

Rebased onto current master (lockfile/CI updates). Previous red matrix was Bundler frozen-mode vs stale locks, not the cron slug change.

Workflows are currently waiting on maintainer Approve and run workflows for this fork push. After that, CI should be able to go green; CHANGELOG is already removed per earlier review.

@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: medium PR risk score: medium labels Dec 4, 2026
Find the cut near the retained tail and hash the exact prefix. Keep the slug within the length limit when separators repeat.
@amkisko
amkisko force-pushed the patch/cron-monitor-slug-formatting branch from 26aaeff to d276888 Compare December 4, 2026 13:19
@github-actions github-actions Bot removed the risk: medium PR risk score: medium label Dec 4, 2026
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crons: default monitor slugs from class names should use underscore word breaks Support good_job

3 participants