-
-
Notifications
You must be signed in to change notification settings - Fork 435
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
Tracing without Performance #2788
Conversation
@markushi and @marandaneto I'll leave some markers where I'd like your input. A full review would be very welcome as well. |
sentry-android-core/src/main/java/io/sentry/android/core/ActivityLifecycleIntegration.java
Outdated
Show resolved
Hide resolved
...droid-core/src/main/java/io/sentry/android/core/internal/gestures/SentryGestureListener.java
Outdated
Show resolved
Hide resolved
...ry-android-navigation/src/main/java/io/sentry/android/navigation/SentryNavigationListener.kt
Outdated
Show resolved
Hide resolved
}); | ||
} | ||
|
||
public static void traceIfAllowed( |
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.
M: I believe it'd be better if this just returns a boolean
?
Executing a callback forces you to have Atomic operations in a few different places.
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.
Hmm could change it to return the TracingHeaders
instead of having a callback. With @Nullable
it'd only be a simple null
check on the calling side. If this returned a boolean we'd have to duplicate the extraction code everywhere.
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.
Then returning TracingHeaders
looks already better.
maybe @romtsn or @stefanosiano ? Markus is OOO. |
@adinauer related to your questions/markers, I believe @cleptric can help? since it's not Android related, but rather how this feature should work, Also https://www.notion.so/sentry/Tracing-without-performance-efab307eb7f64e71a04f09dc72722530 The places you added a TODO are where a new transaction would be created (but performance is disabled), so in this case, you do nothing, right? |
It's basically the following question and answer from #2768:
So in theory we should be starting a new trace there. I just wanted your input for Android specifics. |
With my (limited) understanding of tracing, I'd say we should start a new trace for all of the markers you left. When UI is involved, a User Interaction (whether navigation or click) usually marks the start of a new trace (e.g. you clicked "Save" button - then you make |
Yes, exactly, what I meant by "you do nothing because performance is disabled" means, you don't start a transaction. |
|
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
dc67004 | 273.86 ms | 346.37 ms | 72.51 ms |
9246ed4 | 275.63 ms | 321.31 ms | 45.69 ms |
8820c5c | 330.60 ms | 416.86 ms | 86.26 ms |
9246ed4 | 281.79 ms | 352.08 ms | 70.29 ms |
0310da5 | 381.20 ms | 404.50 ms | 23.30 ms |
496bdfd | 272.86 ms | 407.33 ms | 134.48 ms |
496bdfd | 301.22 ms | 343.96 ms | 42.73 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
dc67004 | 1.72 MiB | 2.28 MiB | 573.45 KiB |
9246ed4 | 1.72 MiB | 2.28 MiB | 572.22 KiB |
8820c5c | 1.72 MiB | 2.28 MiB | 571.82 KiB |
9246ed4 | 1.72 MiB | 2.28 MiB | 572.22 KiB |
0310da5 | 1.72 MiB | 2.28 MiB | 573.45 KiB |
496bdfd | 1.72 MiB | 2.28 MiB | 571.82 KiB |
496bdfd | 1.72 MiB | 2.28 MiB | 571.82 KiB |
Previous results on branch: feat/tracing-without-performance
Startup times
Revision | Plain | With Sentry | Diff |
---|---|---|---|
25cb71a | 322.37 ms | 395.86 ms | 73.49 ms |
d50b334 | 299.84 ms | 401.56 ms | 101.72 ms |
0a8926a | 293.88 ms | 333.60 ms | 39.72 ms |
bfaa13c | 256.71 ms | 313.62 ms | 56.91 ms |
c4c8632 | 295.86 ms | 322.98 ms | 27.12 ms |
9c8777f | 280.52 ms | 370.46 ms | 89.94 ms |
03de2a6 | 281.98 ms | 318.64 ms | 36.66 ms |
1d85b7f | 303.18 ms | 356.62 ms | 53.44 ms |
6da169c | 295.60 ms | 390.86 ms | 95.26 ms |
8cfda4c | 355.00 ms | 425.33 ms | 70.33 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
25cb71a | 1.72 MiB | 2.28 MiB | 572.59 KiB |
d50b334 | 1.72 MiB | 2.29 MiB | 574.13 KiB |
0a8926a | 1.72 MiB | 2.29 MiB | 574.47 KiB |
bfaa13c | 1.72 MiB | 2.29 MiB | 574.47 KiB |
c4c8632 | 1.72 MiB | 2.29 MiB | 574.15 KiB |
9c8777f | 1.72 MiB | 2.29 MiB | 574.16 KiB |
03de2a6 | 1.72 MiB | 2.29 MiB | 574.47 KiB |
1d85b7f | 1.72 MiB | 2.28 MiB | 572.59 KiB |
6da169c | 1.72 MiB | 2.29 MiB | 574.39 KiB |
8cfda4c | 1.72 MiB | 2.29 MiB | 574.47 KiB |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #2788 +/- ##
============================================
+ Coverage 81.15% 81.25% +0.10%
- Complexity 4501 4560 +59
============================================
Files 348 350 +2
Lines 16685 16870 +185
Branches 2268 2274 +6
============================================
+ Hits 13540 13708 +168
- Misses 2198 2219 +21
+ Partials 947 943 -4
☔ View full report in Codecov by Sentry. |
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.
@marandaneto @romtsn @markushi I've updated the PR now so should be good to review. Not sure about gesture listener and starting a new trace there.
...droid-core/src/main/java/io/sentry/android/core/internal/gestures/SentryGestureListener.java
Outdated
Show resolved
Hide resolved
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.
Nice one, already looks pretty complete to me 🚀 Left a few comments.
...droid-core/src/main/java/io/sentry/android/core/internal/gestures/SentryGestureListener.java
Outdated
Show resolved
Hide resolved
sentry-apollo-3/src/main/java/io/sentry/apollo3/SentryApollo3HttpInterceptor.kt
Show resolved
Hide resolved
Co-authored-by: Manoel Aranda Neto <5731772+marandaneto@users.noreply.github.com>
@marandaneto any more changes you'd like to see before I merge this? |
PR is already approved, and all my comments were addressed, all good, thank you. |
sentry-android-core/src/main/java/io/sentry/android/core/ActivityLifecycleIntegration.java
Outdated
Show resolved
Hide resolved
sentry-android-core/src/main/java/io/sentry/android/core/ActivityLifecycleIntegration.java
Outdated
Show resolved
Hide resolved
...droid-core/src/main/java/io/sentry/android/core/internal/gestures/SentryGestureListener.java
Outdated
Show resolved
Hide resolved
…ityLifecycleIntegration.java Co-authored-by: Roman Zavarnitsyn <rom4ek93@gmail.com>
sentry-android-core/src/main/java/io/sentry/android/core/ActivityLifecycleIntegration.java
Outdated
Show resolved
Hide resolved
sentry-android-core/src/main/java/io/sentry/android/core/ActivityLifecycleIntegration.java
Outdated
Show resolved
Hide resolved
sentry-android-core/src/main/java/io/sentry/android/core/ActivityLifecycleIntegration.java
Outdated
Show resolved
Hide resolved
sentry-android-core/src/main/java/io/sentry/android/core/ActivityLifecycleIntegration.java
Show resolved
Hide resolved
Made a couple of more suggestions as I realized we check for the breadcrumbs flag inside |
Co-authored-by: Roman Zavarnitsyn <rom4ek93@gmail.com>
📜 Description
Pass through / add
sentry-trace
andbaggage
even if performance is disabled.💡 Motivation and Context
Closes #2768
💚 How did you test it?
wanna do some more e2e testing before merging
📝 Checklist
sendDefaultPII
is enabled.🔮 Next steps