-
-
Notifications
You must be signed in to change notification settings - Fork 267
fix(tracing): Generate new trace on navigation #2861
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2861 +/- ##
==========================================
- Coverage 87.68% 87.68% -0.01%
==========================================
Files 272 272
Lines 9031 9037 +6
==========================================
+ Hits 7919 7924 +5
- Misses 1112 1113 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Android Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
d189e01 | 328.67 ms | 397.12 ms | 68.45 ms |
dfcfde9 | 464.98 ms | 526.06 ms | 61.08 ms |
4f6634c | 418.68 ms | 524.88 ms | 106.20 ms |
abcdba3 | 354.68 ms | 399.04 ms | 44.36 ms |
25fdf12 | 451.85 ms | 526.20 ms | 74.35 ms |
ef6466d | 373.96 ms | 443.17 ms | 69.21 ms |
6e9c5a2 | 392.32 ms | 498.51 ms | 106.19 ms |
a758ebd | 556.55 ms | 588.14 ms | 31.59 ms |
c1bb00f | 303.77 ms | 371.88 ms | 68.11 ms |
9f9f94f | 331.04 ms | 368.92 ms | 37.88 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
d189e01 | 6.16 MiB | 7.14 MiB | 1009.90 KiB |
dfcfde9 | 6.46 MiB | 7.48 MiB | 1.03 MiB |
4f6634c | 6.46 MiB | 7.48 MiB | 1.02 MiB |
abcdba3 | 5.94 MiB | 6.95 MiB | 1.01 MiB |
25fdf12 | 6.46 MiB | 7.48 MiB | 1.02 MiB |
ef6466d | 6.34 MiB | 7.28 MiB | 967.79 KiB |
6e9c5a2 | 6.35 MiB | 7.42 MiB | 1.07 MiB |
a758ebd | 6.49 MiB | 7.57 MiB | 1.08 MiB |
c1bb00f | 6.06 MiB | 7.09 MiB | 1.03 MiB |
9f9f94f | 5.94 MiB | 6.95 MiB | 1.01 MiB |
iOS Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
3e4b523 | 1260.53 ms | 1270.06 ms | 9.53 ms |
d5696bf | 1232.96 ms | 1254.50 ms | 21.54 ms |
c978477 | 1228.43 ms | 1249.17 ms | 20.74 ms |
ef31c7f | 1272.43 ms | 1295.71 ms | 23.29 ms |
1596141 | 1230.77 ms | 1241.90 ms | 11.13 ms |
b49bf00 | 1248.00 ms | 1260.35 ms | 12.35 ms |
934f10e | 1245.18 ms | 1263.77 ms | 18.59 ms |
0ac1eed | 1278.51 ms | 1285.29 ms | 6.78 ms |
b9da046 | 1256.43 ms | 1275.82 ms | 19.39 ms |
9ed26e6 | 1263.84 ms | 1281.04 ms | 17.20 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
3e4b523 | 8.28 MiB | 9.33 MiB | 1.05 MiB |
d5696bf | 8.38 MiB | 9.73 MiB | 1.35 MiB |
c978477 | 8.32 MiB | 9.50 MiB | 1.18 MiB |
ef31c7f | 8.09 MiB | 9.07 MiB | 1000.79 KiB |
1596141 | 8.29 MiB | 9.37 MiB | 1.08 MiB |
b49bf00 | 8.10 MiB | 9.08 MiB | 1004.36 KiB |
934f10e | 8.38 MiB | 9.77 MiB | 1.39 MiB |
0ac1eed | 8.10 MiB | 9.16 MiB | 1.07 MiB |
b9da046 | 8.10 MiB | 9.16 MiB | 1.07 MiB |
9ed26e6 | 8.42 MiB | 9.89 MiB | 1.46 MiB |
Previous results on branch: start-new-trace-on-navigation
Startup times
Revision | Plain | With Sentry | Diff |
---|---|---|---|
d34ee4a | 1255.47 ms | 1273.55 ms | 18.08 ms |
5a0c06d | 1254.45 ms | 1264.45 ms | 10.00 ms |
c782130 | 1274.96 ms | 1285.33 ms | 10.38 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
d34ee4a | 8.43 MiB | 10.04 MiB | 1.61 MiB |
5a0c06d | 8.43 MiB | 10.04 MiB | 1.61 MiB |
c782130 | 8.43 MiB | 10.01 MiB | 1.58 MiB |
} else if (!_options.isTracingEnabled()) { | ||
final item = _peek(); | ||
item.scope.propagationContext = PropagationContext(); |
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.
this code doesn't make sense, we can remove it. a new start transaction with performance disabled should not be able to create a new trace, it should just no-op
@@ -470,6 +466,7 @@ class Hub { | |||
} | |||
|
|||
transactionContext.origin ??= SentryTraceOrigins.manual; | |||
transactionContext.traceId = scope.propagationContext.traceId; |
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.
navigator observer will take care of updating the propagation context so new transactions just need to use it and child spans will inherit the trace id from parent
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.
Looks good, we should only add some tests.
@@ -43,6 +43,17 @@ class Scope { | |||
/// Returns active transaction or null if there is no active transaction. | |||
ISentrySpan? span; | |||
|
|||
/// The propagation context for connecting errors and spans to traces. |
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.
Love the additional descriptions/documetnations you have added. ❤️
One step closer towards #2753
💚 How did you test it?
Manual test, unit tests
📝 Checklist
sendDefaultPii
is enabled🔮 Next steps
Follow up PR: implement it for app lifecycle