Repository navigation
Commit 19a5688
feat(android): Add trace markers to SentryAndroid.init (#5901)
* feat(android): Add trace markers to SentryAndroid.init (JAVA-685)
Wrap SentryAndroid.init and the user OptionsConfiguration callback in
android.os.Trace sections so SDK startup cost shows up as named slices
in a Perfetto trace or a CI TraceSectionMetric.
Sections use constant names and allocate nothing when no trace is
recording. Kept intentionally minimal as the SDK's first shipped Trace
instrumentation.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* changelog
* feat(android): Keep only the SentryAndroid.init trace section (JAVA-685)
Drop the SentryAndroid.init.configure section to keep the SDK's first
shipped android.os.Trace instrumentation minimal and easy to review.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Remove changelog entry in favor of #skip-changelog
* fix(android): Balance init trace section on lock failure (JAVA-685)
Move Trace.beginSection above the try-with-resources so it always
pairs with the endSection() in the finally. If staticLock.acquire()
threw (e.g. OOM allocating the lock), the body was skipped but the
finally still ran, popping an unrelated systrace section.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent 8a8d947 commit 19a5688
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
98 | 102 | | |
99 | 103 | | |
100 | 104 | | |
| |||
219 | 223 | | |
220 | 224 | | |
221 | 225 | | |
| 226 | + | |
| 227 | + | |
222 | 228 | | |
223 | 229 | | |
224 | 230 | | |
| |||
0 commit comments