Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add
sidekiq-cron
patch for automatic monitoring of jobs listed in the schedule #2170Add
sidekiq-cron
patch for automatic monitoring of jobs listed in the schedule #2170Changes from all commits
0699b8c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this make it so any invocation of the related Job class, including invocations triggered by
sidekiq-cron
, and invocations that the user did manually, with justHappyWorkerJob.perform_async
? It looks like it would, right?I wonder if there are situations when users want to kick the same job for a one-off thing that they don't want to be reported to Sentry. I, personally, think that since the defined
sidekiq-cron
job just wraps aSidekiq
job, than whenever that job was triggered, it should be reported.Do we want to add this to docs? Is this behavior consistent with other languages and frameworks Sentry supports?
/cc @sl0thentr0py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will add docs for all of this around releasing.
yes
This is a new feature, we will add special config once people use it and request it. This is fine as a first version, it's an opt-in patch either way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like there could be multiple ways to invoke
save
in addition to the initial creation. Although the current implementation doesn't seem to have obvious performance impact, I feel a better place to inject such one-off activation logic isload_from_array
instead.I understand that it's an experimental feature for now, so I'm not suggesting an immediate refactor. Just want to point it out for future improvements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if people are scheduling cron jobs with
Sidekiq::Cron::Job.create
, we patch those too automatically, either way shouldn't matter, we can react to feedback from users later depending on usage.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honest question so I can draft the docs PR:
sidekiq-cron
and/orsidekiq-scheduler
monitoring, the users will have to manually addconfig.enabled_patches += [:sidekiq_cron]
, right?sidekiq-cron
is indeed available, we aim to instrument all jobs that it runs, all the time. The current logic that hooks intosave
does that. Correct?sidekiq-cron
schedule that invoked the job on a timer, or the user's code invokedperform_*
on that job, we will monitor that too. That's by design for now, but we'll keep an eye out for feedback. Right?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes to all