Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 9 additions & 12 deletions docs/platforms/android/tracing/instrumentation/perf-v2.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,41 @@ sidebar_order: 11
description: "Learn how to get even more insights into Android app performance"
---

<Alert>
Performance V2 contains a set of features that enrich performance instrumentation. It tightly integrates with the [Mobile Vitals](/product/insights/mobile/mobile-vitals/) Insights module, enabling <PlatformLink to="/tracing/instrumentation/perf-v2/#app-start">App Start</PlatformLink> and <PlatformLink to="/tracing/instrumentation/perf-v2/#frames-delay">Frames Delay</PlatformLink> reporting.

This feature is marked as _experimental_.
Supported in Sentry's Android SDK version `7.4.0` and above.

</Alert>

Performance V2 is a set of features which enrich your existing instrumentation, giving you more insights into potential performance bottlenecks. These features tightly integrate with the [Mobile Vitals](/product/insights/mobile/mobile-vitals/) insights module.
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}
```java {filename:MyApplication.java} {4}
import io.sentry.android.core.SentryAndroid;

SentryAndroid.init(this, options -> {
options.setEnablePerformanceV2(true);
});
```

```kotlin {filename:MyApplication.kt}
```kotlin {filename:MyApplication.kt} {4}
import io.sentry.android.core.SentryAndroid

SentryAndroid.init(this) { options ->
options.enablePerformanceV2 = true
}
```

```xml {filename:AndroidManifest.xml}
```xml {filename:AndroidManifest.xml} {3-5}
<manifest>
<application>
<meta-data android:name="io.sentry.performance-v2.enable" android:value="true" />
<meta-data
android:name="io.sentry.performance-v2.enable"
android:value="true" />
</application>
</manifest>
```

### App Start

Besides enabling performance-v2, this feature requires the <PlatformLink to="/configuration/gradle/">Sentry Android Gradle Plugin</PlatformLink> (version `4.2.0` or above) to be applied to your app module.
Besides enabling Performance V2, this feature requires the <PlatformLink to="/configuration/gradle/">Sentry Android Gradle Plugin</PlatformLink> (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:
* `process.load`: The process initialization time
Expand Down