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

Fix Sidekiq tracing headers not being overwritten in case of schedules and retries #2118

Merged
merged 1 commit into from Sep 28, 2023

Conversation

sl0thentr0py
Copy link
Member

@sl0thentr0py sl0thentr0py commented Sep 28, 2023

#1774 added SentryContextClientMiddleware to the server middleware chain too.

Sidekiq's scheduler pushes to the client on the server again for schedules and retries which causes our trace propagation to be broken for this case.

Prioritize taking the trace propagation headers from the job whenever they exist.

…s and retries [#2118](#2118)

#1774 added
`SentryContextClientMiddleware` to the server middleware chain too.

Sidekiq's scheduler pushes to the client on the server again for
schedules and retries which causes our trace propagation to be broken
for this case.
https://github.com/sidekiq/sidekiq/blob/aadc77a172f1490fb141c7936d2801ca3af925ef/lib/sidekiq/scheduled.rb#L39

Prioritize taking the trace propagation headers from the job whenever
they exist.
@codecov
Copy link

codecov bot commented Sep 28, 2023

Codecov Report

All modified lines are covered by tests ✅

Files Coverage Δ
...iq/lib/sentry/sidekiq/sentry_context_middleware.rb 97.50% <100.00%> (ø)

📢 Thoughts on this report? Let us know!.

Copy link
Member

@szokeasaurusrex szokeasaurusrex left a comment

Choose a reason for hiding this comment

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

looks good

@sl0thentr0py sl0thentr0py merged commit a024558 into master Sep 28, 2023
98 of 99 checks passed
@sl0thentr0py sl0thentr0py deleted the neel/fix-sidekiq-propagation branch September 28, 2023 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants