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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Respect existing baggage header instead of overwriting it #1995
Conversation
The only test that keeps failing is the "UI Tests on iOS 12 Simulator" one, with the usual "Failed to get matching snapshots: Timed out while evaluating UI query". But I haven't touched the UI in this PR at all, so that's weird. I'll download the iOS 12 simulator on my computer, see if I can spot the problem. |
We have one failing UI test on iOS 12, which is unrelated to this PR and has started happening a while ago. I created a separate issue for this (#2000), I don't think it should block this PR. |
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.
LGTM
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.
LGTM
馃摐 Description
SentryNetworkTracker
adds a baggage header with some sentry keys and values, but it does so by completely overwriting any possibly existing baggage header. And when we remove the baggage header whenSentrySDK.currentHub.scope.span
isnil
, we also do that by removing the entire baggage header instead of only thesentry-trace_id
key that we actually need to remove.Now we respect the existing baggage header, if it's there, by modifying it.
馃挕 Motivation and Context
Closes #1911
馃挌 How did you test it?
Unit tests.
馃摑 Checklist
馃敭 Next steps