-
-
Notifications
You must be signed in to change notification settings - Fork 271
Fix trace ID mismatch in Sentry #3069
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: giancarlo.buenaflor <[email protected]>
Co-authored-by: giancarlo.buenaflor <[email protected]>
Co-authored-by: giancarlo.buenaflor <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3069 +/- ##
=======================================
Coverage 87.72% 87.72%
=======================================
Files 286 286
Lines 9718 9719 +1
=======================================
+ Hits 8525 8526 +1
Misses 1193 1193 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
iOS Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
e2d675d | 1238.48 ms | 1242.76 ms | 4.28 ms |
aeb02f2 | 1244.29 ms | 1256.55 ms | 12.26 ms |
6ba4675 | 1223.12 ms | 1238.17 ms | 15.04 ms |
9b99523 | 1256.06 ms | 1270.33 ms | 14.27 ms |
2d34233 | 1258.19 ms | 1268.92 ms | 10.73 ms |
b6c8720 | 1252.65 ms | 1266.61 ms | 13.96 ms |
73a3c38 | 1263.37 ms | 1277.90 ms | 14.53 ms |
93b7728 | 1247.23 ms | 1264.87 ms | 17.64 ms |
0fb3800 | 1256.60 ms | 1266.28 ms | 9.68 ms |
ec78888 | 1251.37 ms | 1269.40 ms | 18.04 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
e2d675d | 7.86 MiB | 9.44 MiB | 1.58 MiB |
aeb02f2 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
6ba4675 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
9b99523 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
2d34233 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
b6c8720 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
73a3c38 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
93b7728 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
0fb3800 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
ec78888 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
Previous results on branch: cursor/fix-trace-id-mismatch-in-sentry-b9d6
Startup times
Revision | Plain | With Sentry | Diff |
---|---|---|---|
4a7df4b | 1257.51 ms | 1272.77 ms | 15.26 ms |
94faec8 | 1246.73 ms | 1255.59 ms | 8.86 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
4a7df4b | 7.86 MiB | 9.44 MiB | 1.58 MiB |
94faec8 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
Android Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
73dca78 | 476.53 ms | 522.21 ms | 45.68 ms |
e2d675d | 457.92 ms | 529.17 ms | 71.25 ms |
2d34233 | 470.54 ms | 558.90 ms | 88.36 ms |
73a3c38 | 478.18 ms | 526.62 ms | 48.44 ms |
6ba4675 | 499.80 ms | 632.43 ms | 132.63 ms |
93b7728 | 475.28 ms | 489.13 ms | 13.86 ms |
aeb02f2 | 373.84 ms | 437.00 ms | 63.16 ms |
dbd526b | 504.88 ms | 569.02 ms | 64.15 ms |
793f4dc | 462.68 ms | 544.21 ms | 81.53 ms |
640ad0c | 466.00 ms | 552.67 ms | 86.67 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
73dca78 | 6.54 MiB | 7.69 MiB | 1.15 MiB |
e2d675d | 6.54 MiB | 7.69 MiB | 1.15 MiB |
2d34233 | 6.54 MiB | 7.55 MiB | 1.01 MiB |
73a3c38 | 6.54 MiB | 7.69 MiB | 1.15 MiB |
6ba4675 | 6.54 MiB | 7.53 MiB | 1015.26 KiB |
93b7728 | 6.54 MiB | 7.69 MiB | 1.15 MiB |
aeb02f2 | 6.54 MiB | 7.69 MiB | 1.15 MiB |
dbd526b | 6.54 MiB | 7.69 MiB | 1.15 MiB |
793f4dc | 6.54 MiB | 7.69 MiB | 1.15 MiB |
640ad0c | 6.54 MiB | 7.69 MiB | 1.15 MiB |
Previous results on branch: cursor/fix-trace-id-mismatch-in-sentry-b9d6
Startup times
Revision | Plain | With Sentry | Diff |
---|---|---|---|
94faec8 | 464.50 ms | 527.90 ms | 63.40 ms |
4a7df4b | 450.21 ms | 546.29 ms | 96.08 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
94faec8 | 6.54 MiB | 7.69 MiB | 1.15 MiB |
4a7df4b | 6.54 MiB | 7.69 MiB | 1.15 MiB |
denrase
approved these changes
Jul 14, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
📜 Description
Fixes an issue where
Scope.clone()
(used bywithScope
) created a newPropagationContext
instead of sharing the existing one. Now, thePropagationContext
instance is shared, ensuring trace continuity.💡 Motivation and Context
This change fixes #3067, where different trace IDs were sent to Sentry events and HTTP Request Headers when
withScope
was used. The originalScope.clone()
implementation was incorrectly creating a newPropagationContext
, leading to inconsistent trace IDs and broken distributed tracing. By sharing thePropagationContext
instance, trace IDs and baggage remain consistent across the original and cloned scopes.💚 How did you test it?
Unit tests, manual testing
📝 Checklist
sendDefaultPii
is enabled🔮 Next steps