Repository navigation
ref(android): Remove the enablePerformanceV2 option - #6458
Open
runningcode wants to merge 2 commits into
Open
runningcode wants to merge 2 commits into
runningcode wants to merge 2 commits into
Conversation
Performance V2 has defaulted to on for a long time, so 9.0 drops the option and its io.sentry.performance-v2.enable manifest key. Without the flag the v1 paths can't run, so remove them too: the FrameMetricsAggregator-based ActivityFramesTracker, its constructor parameters, and the options parameter of AppStartMetrics.getAppStartTimeSpanWithFallback. SpanFrameMetricsCollector is now always registered. Fixes JAVA-527 Fixes #5472 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
🚨 Detected changes in high risk code 🚨High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:
|
1 similar comment
Contributor
🚨 Detected changes in high risk code 🚨High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:
|
📲 Install BuildsAndroid
|
1 of 6 tasks
runningcode
marked this pull request as ready for review
November 4, 2026 14:34
runningcode
requested review from
0xadam-brown,
adinauer,
markushi and
romtsn
as code owners
November 4, 2026 14:34
This branch has not been deployed
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.
📜 Description
Removes the
enablePerformanceV2option and itsio.sentry.performance-v2.enablemanifest key. Performance V2 is now always on.With the flag gone, the v1 code paths can't run anymore, so this also deletes them:
ActivityFramesTracker, the v1 slow/frozen frames tracker built on androidxFrameMetricsAggregator. It already no-oped whenever V2 was on.SpanFrameMetricsCollectoris now always registered and records frame measurements per span.ActivityFramesTrackerparameter onActivityLifecycleIntegration's public constructor,PerformanceAndroidEventProcessorand theAndroidOptionsInitializerplumbing.SentryAndroidOptionsparameter onAppStartMetrics.getAppStartTimeSpanWithFallback, which only read the flag.FrameMetricsAggregator.App starts are always measured from process start on API 24+. Below API 24 they still fall back to SDK init time, like before.
💡 Motivation and Context
The flag has defaulted to
truefor a long time, and we don't expect anyone to turn it off. Dropping it in the 9.0 major removes a configuration surface and about 1,200 lines of v1 code and tests.GitHub code search found no use of
ActivityFramesTracker,getAppStartTimeSpanWithFallbackor the flag in the hybrid SDKs.enablePerformanceV2flag #5472💚 How did you test it?
SpanFrameMetricsCollectoris registered by default.foreground standalone app start measurement uses foreground fallback time span, which relied on V2 being off. It now uses an app start span longer than the one-minute cap, so the foreground fallback to SDK init time is still covered.if app is launched in background, appStartTimeSpanWithFallback returns an empty spanonly passed through the v1 path. It created an activity, and since then an activity created after a background launch starts a new warm start. V1 ignored that restarted span. The test now checks the background launch without an activity, and the next test already covers the warm start.AutomaticSpansTestframes UI tests (V2 on and off) into one.sentry-android-coreunit tests locally.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
Update the Android docs in sentry-docs:
tracing/instrumentation/perf-v2.mdxstill shows how to enable the option, andfeatures/index.mdxandautomatic-instrumentation.mdxlink to it.🤖 Generated with Claude Code