feat(extend-app-start): [1/4] Add IAppStartExtender bridge#5605
Open
buenaflor wants to merge 1 commit into
Open
feat(extend-app-start): [1/4] Add IAppStartExtender bridge#5605buenaflor wants to merge 1 commit into
buenaflor wants to merge 1 commit into
Conversation
Contributor
|
This was referenced Jun 23, 2026
📲 Install BuildsAndroid
|
Contributor
Performance metrics 🚀
|
…s wiring Introduces the @ApiStatus.Internal IAppStartExtender contract (extendAppStart / finishAppStart / getExtendedAppStartSpan) and a NoOp default, wired into SentryOptions. This is the naming-stable core bridge for the app start extension API; it is inert (returns NoOpSpan / no-ops) until the Android implementation and public Sentry facade land later in the stack. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
064d3f1 to
7a7d63f
Compare
buenaflor
commented
Jun 23, 2026
Comment on lines
+6
to
+17
| class NoOpAppStartExtenderTest { | ||
| private val extender = NoOpAppStartExtender.getInstance() | ||
|
|
||
| @Test fun `extendAppStart does not throw`() = extender.extendAppStart() | ||
|
|
||
| @Test fun `finishAppStart does not throw`() = extender.finishAppStart() | ||
|
|
||
| @Test | ||
| fun `getExtendedAppStartSpan returns NoOpSpan`() { | ||
| assertSame(NoOpSpan.getInstance(), extender.extendedAppStartSpan) | ||
| } | ||
| } |
Contributor
Author
There was a problem hiding this comment.
following conventions of existing no-op class tests, lmk if we dont need this
There was a problem hiding this comment.
Pull request overview
Adds the core (internal) bridge for the upcoming “extend app start” feature by introducing an IAppStartExtender contract with a default no-op implementation and wiring it into SentryOptions. This establishes stable naming in the core SDK while keeping the feature inert until Android/public facade PRs land later in the stack.
Changes:
- Add
IAppStartExtender(@ApiStatus.Internal) andNoOpAppStartExtenderdefault implementation. - Wire
appStartExtenderintoSentryOptionswith an internal getter/setter and default to the no-op. - Add unit tests for the new option default/setter behavior and for the no-op extender behavior; update
sentry.api.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| sentry/src/main/java/io/sentry/SentryOptions.java | Adds appStartExtender field + @ApiStatus.Internal getter/setter with default no-op implementation. |
| sentry/src/main/java/io/sentry/IAppStartExtender.java | Introduces the internal contract bridging future Sentry.extendAppStart()-style APIs to platform implementation. |
| sentry/src/main/java/io/sentry/NoOpAppStartExtender.java | Adds default no-op implementation returning NoOpSpan and no-op lifecycle methods. |
| sentry/src/test/java/io/sentry/SentryOptionsTest.kt | Verifies SentryOptions defaults to NoOpAppStartExtender and returns a custom extender when set. |
| sentry/src/test/java/io/sentry/NoOpAppStartExtenderTest.kt | Tests singleton/no-throw behavior and that the extended span is NoOpSpan. |
| sentry/api/sentry.api | Updates API dump to include the new types and SentryOptions accessor methods. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+3
to
+5
| import org.jetbrains.annotations.NotNull; | ||
|
|
||
| public final class NoOpAppStartExtender implements IAppStartExtender { |
| } | ||
|
|
||
| @Test | ||
| fun `when appStartExtender is set, its returned as well`() { |
8 tasks
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
@ApiStatus.InternalIAppStartExtendercontract and aNoOpAppStartExtenderdefault, wired intoSentryOptionswith a getter/setter mirroringfullyDisplayedReporter.This is the naming-stable core bridge for the app start extension API. It is inert (returns
NoOpSpan/ no-ops) until the Android implementation and the publicSentryfacade land later in the stack. Keeping the public-facing surface out of this PR isolates the API naming from the machinery.💡 Motivation and Context
First PR of the stack implementing the app start extension API (part of #5553), which lets apps extend the app start measurement to cover extra launch-time work (mirrors sentry-cocoa's
extendAppLaunch()). Splitting into stacked PRs keeps each change small and reviewable.💚 How did you test it?
Unit tests (TDD):
SentryOptionsTest— defaultappStartExtenderisNoOpAppStartExtender; setter works.NoOpAppStartExtenderTest— singleton;getExtendedAppStartSpan()returnsNoOpSpan;extendAppStart()/finishAppStart()no-op../gradlew :sentry:apiCheck :sentry:spotlessJavaCheck :sentry:spotlessKotlinCheckpass.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
[2/4]— deferred extended span +AppStartMetricsextension state.#skip-changelog