Skip to content
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 retry_count tag to Sidekiq job traces #1089

Merged
merged 1 commit into from
Jul 9, 2020

Conversation

elyalvarado
Copy link
Contributor

Currently the traces captured for Sidekiq jobs when using the sidekiq integration include sidekiq.job.retry which is just the configuration value for whether the job should be retried, or how many retries should be attempted. This information doesn't add too much value, as it can be found on the code and rarely changes for any particular job.

image

This PR adds the current retry count for each job, which is available as retry_count in the job payload according to Sidekiq documentation. This information is useful for debugging and identifying traces of jobs that are being repeated.

Currently the traces include sidekiq.job.retry which is just the
configuration value for whether the job should be retried, or how many
retries should be attempted. This adds the current retry count for each
job.
@elyalvarado elyalvarado requested a review from a team June 18, 2020 19:22
Copy link
Member

@marcotc marcotc left a comment

Choose a reason for hiding this comment

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

Thank you so much for this work @elyalvarado.

I was looking into a way to test this change, but Sidekiq will only reach its retry logic when running a real Sidekiq daemon thread, fetching jobs from Redis.

This is very distinct from our current testing setup, which uses Sidekiq::Testing.

Overall, I think the value provided is worth merging this change despite testing limitations.

@marcotc marcotc added community Was opened by a community member feature Involves a product feature integrations Involves tracing integrations labels Jul 8, 2020
@marcotc marcotc merged commit cbbf0be into DataDog:master Jul 9, 2020
@marcotc marcotc added this to the 0.38.0 milestone Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Was opened by a community member feature Involves a product feature integrations Involves tracing integrations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants