From 3f0738d60077b431781299871694a9c38488b4ce Mon Sep 17 00:00:00 2001 From: Nelson Osacky Date: Wed, 4 Nov 2026 14:28:45 +0100 Subject: [PATCH] docs(android): Document enablePerformanceV2 removal sentry-java 9.0 removes the enablePerformanceV2 option and its io.sentry.performance-v2.enable manifest entry, so Performance V2 is always on. It also deletes ActivityFramesTracker, the v1 slow and frozen frames tracker built on androidx FrameMetricsAggregator. Add a section to the v8-to-v9 migration guide, remove the enable instructions from the Performance V2 page, and drop wording that implies the option must be enabled. Remove the AndroidX Support note, since excluding androidx.core no longer disables slow and frozen frames. Refs getsentry/sentry-java#6458 Refs JAVA-527 Co-Authored-By: Claude Opus 5.5 --- docs/platforms/android/features/index.mdx | 4 +-- docs/platforms/android/migration/v8-to-v9.mdx | 22 +++++++++++- .../automatic-instrumentation.mdx | 20 ++--------- .../tracing/instrumentation/perf-v2.mdx | 34 ++----------------- 4 files changed, 29 insertions(+), 51 deletions(-) diff --git a/docs/platforms/android/features/index.mdx b/docs/platforms/android/features/index.mdx index c0167b568eb6f2..4353184a64470a 100644 --- a/docs/platforms/android/features/index.mdx +++ b/docs/platforms/android/features/index.mdx @@ -9,8 +9,8 @@ Sentry's Android SDK enables automatic reporting of errors and exceptions, and i -We released Performance-V2, -a set of experimental features to give you more details about app start performance and frame delay on a span level. +We released Performance V2, +a set of features that give you more details about app start performance and frame delay on a span level. We released Source Context, which shows snippets of code around the location of stack frames. diff --git a/docs/platforms/android/migration/v8-to-v9.mdx b/docs/platforms/android/migration/v8-to-v9.mdx index 623ada90f4c857..f7e9850e1cd155 100644 --- a/docs/platforms/android/migration/v8-to-v9.mdx +++ b/docs/platforms/android/migration/v8-to-v9.mdx @@ -4,7 +4,7 @@ description: "Learn how to migrate from Sentry Android SDK 8.x to 9.0.0." sidebar_order: 8890 --- -Version 9 removes the deprecated Hub compatibility APIs and the global Logs and Metrics enable options. Migrate remaining Hub references to Scopes, then update your telemetry configuration. +Version 9 removes the deprecated Hub compatibility APIs, the global Logs and Metrics enable options, and the `enablePerformanceV2` option. Migrate remaining Hub references to Scopes, then update your telemetry configuration. ## Removed Hub APIs @@ -71,3 +71,23 @@ new SentryTimberIntegration(false); ``` Pass `true` only when Timber records should also be sent as Sentry Logs. + +## Removed Performance V2 Option + +Version 8 enabled Performance V2 by default. Version 9 always enables it and removes the option to turn it off: + +- `SentryAndroidOptions.setEnablePerformanceV2(...)` and `SentryAndroidOptions.isEnablePerformanceV2()` have been removed. Delete these calls. +- The `io.sentry.performance-v2.enable` manifest entry has been removed. Delete it from your manifest: + +```xml {filename:AndroidManifest.xml} + +``` + +If you previously turned Performance V2 off, the SDK now: + +- Measures app starts from process start on Android 7.0 (API 24) and later. Below API 24, it falls back to the SDK initialization time. +- Measures slow and frozen frames for each span instead of only for Activity transactions. + +### Removed `ActivityFramesTracker` + +`ActivityFramesTracker` has been removed, and the `ActivityLifecycleIntegration` constructor no longer takes it. If you create `ActivityLifecycleIntegration` manually, pass only the `Application` and `BuildInfoProvider` arguments. diff --git a/docs/platforms/android/tracing/instrumentation/automatic-instrumentation.mdx b/docs/platforms/android/tracing/instrumentation/automatic-instrumentation.mdx index 436b29631d7b59..5161fba14cedb0 100644 --- a/docs/platforms/android/tracing/instrumentation/automatic-instrumentation.mdx +++ b/docs/platforms/android/tracing/instrumentation/automatic-instrumentation.mdx @@ -141,7 +141,7 @@ For example, when the SDK uses process-start timing, the duration includes time The SDK sets the Span operation to `app.start.cold` for _Cold start_ and `app.start.warm` for _Warm start_. -On Android 7.0 (API 24) and later, the SDK can use process start as the beginning of an app start with [Performance V2](/platforms/android/tracing/instrumentation/perf-v2/) enabled. If that timestamp is unavailable or Performance V2 is disabled, it falls back to the SDK initialization time, usually recorded by `SentryPerformanceProvider`. The measurement ends when the first frame is drawn. **Note**: Performance V2 is enabled by default in SDK 8.0 and later. +On Android 7.0 (API 24) and later, the SDK uses process start as the beginning of an app start. If that timestamp is unavailable, it falls back to the SDK initialization time, usually recorded by `SentryPerformanceProvider`. The measurement ends when the first frame is drawn. @@ -310,7 +310,7 @@ Supported on Android OS version `7.0` and above. -Unresponsive UI and animation hitches annoy users and degrade the user experience. Two measurements to track these types of experiences are _slow frames_ and _frozen frames_. If you want your app to run smoothly, you should try to avoid both. The SDK adds these two measurements for the [Activity](/platforms/android/tracing/instrumentation/automatic-instrumentation/#activity-instrumentation) transactions. +Unresponsive UI and animation hitches annoy users and degrade the user experience. Two measurements to track these types of experiences are _slow frames_ and _frozen frames_. If you want your app to run smoothly, you should try to avoid both. The SDK adds these two measurements to every span. Slow and frozen frames are Mobile Vitals, which you can learn about in the [full documentation](/product/dashboards/sentry-dashboards/mobile/mobile-vitals/). @@ -341,20 +341,6 @@ SentryAndroid.init(this) { options -> The option may contain a list of Strings (including regular expressions) which are matched against the URLs of outgoing requests. If one of the entries in the list matches the URL of an outgoing request, trace data will be attached to that request. String entries do not have to be full matches, meaning the URL of a request is matched when it contains a string provided through the option. If `tracePropagationTargets` is not provided, trace data is attached to every outgoing request from the instrumented client. -#### AndroidX Support - -Sentry uses the `androidx.core` library for detecting [slow and frozen frames](#slow-and-frozen-frames). This is necessary to produce accurate results across all Android OS versions. - -We check for availability at runtime, so if you're not using `androidx.core`, you can remove it from Sentry's transitive dependencies. - -```Groovy -implementation ('io.sentry:sentry-android:{{@inject packages.version('sentry.java.android', '4.2.0') }}') { - exclude group: 'androidx.core', module: 'core' -} -``` - -Note that by removing this transitive dependency, slow and frozen frames won't be reported. - ### OkHttp Library Instrumentation The OkHttp's instrumentation, once added the `SentryOkHttpInterceptor`, starts a span out of the active span bound to the scope for each HTTP Request. The SDK sets the span `operation` to `http.client` and `description` to request `$METHOD $url`; for example, `GET https://sentry.io`. @@ -587,7 +573,7 @@ The span starts when each Activity is launched, which is defined as an applicati The span finishes after the Activity draws its first frame. -For the first Activity in a cold start, the TTID span starts at the app-start timestamp rather than just before `Activity.onCreate()`. On Android 7.0 and later, with Performance V2 enabled, the SDK can use process start for this timestamp. +For the first Activity in a cold start, the TTID span starts at the app-start timestamp rather than just before `Activity.onCreate()`. On Android 7.0 and later, the SDK can use process start for this timestamp. When it does, TTID includes `Application.attachBaseContext()` and `Application.onCreate()`. If the SDK falls back to its initialization timestamp, work before SDK initialization may not be included. diff --git a/docs/platforms/android/tracing/instrumentation/perf-v2.mdx b/docs/platforms/android/tracing/instrumentation/perf-v2.mdx index 78a096baf1994c..d3c1ad1a9d4a3b 100644 --- a/docs/platforms/android/tracing/instrumentation/perf-v2.mdx +++ b/docs/platforms/android/tracing/instrumentation/perf-v2.mdx @@ -7,41 +7,13 @@ og_image: /og-images/platforms-android-tracing-instrumentation-perf-v2.png Performance V2 contains a set of features that enrich performance instrumentation. It tightly integrates with the [Mobile Vitals](/product/dashboards/sentry-dashboards/mobile/mobile-vitals/) dashboard module, enabling App Start and Frames Delay reporting. -Since version 8 of the SDK, Performance V2 is generally available and enabled by default. In versions `7.4.0..<8.0.0`, this feature is available as _experimental_ and you need to opt in to use it: - -### Enabling Performance V2 - -```java {filename:MyApplication.java} {4} -import io.sentry.android.core.SentryAndroid; - -SentryAndroid.init(this, options -> { - options.setEnablePerformanceV2(true); -}); -``` - -```kotlin {filename:MyApplication.kt} {4} -import io.sentry.android.core.SentryAndroid - -SentryAndroid.init(this) { options -> - options.enablePerformanceV2 = true -} -``` - -```xml {filename:AndroidManifest.xml} {3-5} - - - - - -``` +Performance V2 is always on. Version 9 of the SDK removes the `enablePerformanceV2` option. If you're upgrading from version 8, see the migration guide. ### App Start -Besides enabling Performance V2, this feature requires the Sentry Android Gradle Plugin (version `4.2.0` or above) to be applied to your app module. +This feature requires the Sentry Android Gradle Plugin (version `4.2.0` or above) to be applied to your app module. -Once enabled, your App Start transaction will show a detailed span breakdown of various components: +Your App Start transaction shows a detailed span breakdown of various components: * `process.load`: The process initialization time * `contentprovider.load`: `ContentProvider.onCreate()` execution time * `application.load`: `Application.onCreate()` execution time