feat(extend-app-start): [4/4] Add public Sentry app start extension API#5628
Open
buenaflor wants to merge 8 commits into
Open
feat(extend-app-start): [4/4] Add public Sentry app start extension API#5628buenaflor wants to merge 8 commits into
buenaflor wants to merge 8 commits into
Conversation
Contributor
|
📲 Install BuildsAndroid
|
Contributor
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 4cf89ba | 340.51 ms | 416.92 ms | 76.41 ms |
| 4451634 | 321.21 ms | 376.21 ms | 55.00 ms |
| 20bbe9a | 305.48 ms | 387.25 ms | 81.77 ms |
| 69caaee | 313.73 ms | 373.92 ms | 60.19 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 4cf89ba | 0 B | 0 B | 0 B |
| 4451634 | 0 B | 0 B | 0 B |
| 20bbe9a | 0 B | 0 B | 0 B |
| 69caaee | 0 B | 0 B | 0 B |
5dfb0e1 to
0bd259a
Compare
bd89a68 to
90684a2
Compare
This was referenced Jun 25, 2026
0bd259a to
0b6ada0
Compare
90684a2 to
51ca64a
Compare
0b6ada0 to
9e6f0a0
Compare
51ca64a to
4c3438c
Compare
9e6f0a0 to
976c29a
Compare
4c3438c to
93464ef
Compare
976c29a to
ac7a577
Compare
93464ef to
a4baf22
Compare
ac7a577 to
c3f3627
Compare
a4baf22 to
c559b65
Compare
c3f3627 to
cbaef2f
Compare
c559b65 to
50357a5
Compare
Static bridge delegating to options.getAppStartExtender(): extendAppStart(), finishAppStart(), getExtendedAppStartSpan(). No-op when the SDK is disabled or the platform provides no app start extender. Completes the extend app start feature (4/4). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
cbaef2f to
d996425
Compare
50357a5 to
4349a42
Compare
…ample Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a public static facade on io.sentry.Sentry for the Android app start extension feature, exposing a small public API surface that delegates to the internally-wired IAppStartExtender in SentryOptions.
Changes:
- Added
Sentry.extendAppStart(),Sentry.finishExtendedAppStart(), andSentry.getExtendedAppStartSpan()as public entry points delegating togetCurrentScopes().getOptions().getAppStartExtender(). - Added unit tests ensuring the new methods delegate correctly and remain no-ops when the SDK is disabled.
- Added an Android sample usage demonstrating extending app start and creating child spans under the extended app start span.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
sentry/src/main/java/io/sentry/Sentry.java |
Introduces the new public facade methods and Javadoc for the app start extension API. |
sentry/src/test/java/io/sentry/SentryTest.kt |
Adds delegation + disabled-SDK no-op coverage for the new public facade methods. |
sentry/api/sentry.api |
Updates the API surface dump to include the newly added Sentry methods. |
sentry-samples/sentry-samples-android/src/main/java/io/sentry/samples/android/MyApplication.java |
Demonstrates intended usage of the new API in the Android sample app. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
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.
PR Stack (Extend App Start)
📜 Description
Adds the public static facade for the app start extension API — the only PR in the stack that adds public API surface. Each method is a thin bridge to
getCurrentScopes().getOptions().getAppStartExtender()(theIAppStartExtenderfrom[1/4]), mirroringSentry.reportFullyDisplayed().Sentry.extendAppStart()Application.onCreate, right afterSentryAndroid.init).Sentry.getExtendedAppStartSpan()ISpanto attach child spans to — or aNoOpSpanwhen no extension is active.Sentry.finishExtendedAppStart()No-op when the SDK is disabled, on platforms without an app start extender, or when standalone app start tracing is off.
Also adds a usage example to the Android sample (
MyApplication):extendAppStart(), child spans undergetExtendedAppStartSpan(), thenfinishExtendedAppStart().💡 Motivation and Context
Fourth and final PR of the app start extension API stack (#5553), which lets apps extend the app start measurement to cover extra launch-time work — e.g. loading remote config before the first screen (mirrors sentry-cocoa's
extendAppLaunch()/finishExtendedAppLaunch()).💚 How did you test it?
SentryTestverifies the three methods delegate tooptions.getAppStartExtender(), and that the API returns a no-op span / no-ops when the SDK is disabled.apiCheck, spotless, and the:sentryunit suite pass; the sample module compiles.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
Final PR of the stack. Once the stack is merged up, the collection branch (#5604) squash-merges into
main.#skip-changelog