The repository contains the OpenTelemetry Android Agent, which initializes the OpenTelemetry Java SDK and provides
auto-instrumentation of Android apps for real user monitoring (RUM).
If your project's minSdk is lower than 26, then you must enable corelib desugaring. See #73 for more information. Further, you must use AGP 8.3.0+ and set the
android.useFullClasspathForDexingTransformproperty ingradle.propertiestotrueto ensure desugaring runs properly. For the full context for this workaround, please see this issue.
To use the Android Agent in your application, you will first need to add
a dependency in your application's build.gradle.kts. We publish a bill of materials (BOM) that
helps to coordinate versions of the this project's components and the upstream
opentelemetry-java-instrumentation and opentelemetry-java dependencies. We recommend
using the BOM as a platform dependency, and then omitting explicit version information
from all other opentelemetry dependencies:
dependencies {
//...
api(platform("io.opentelemetry.android:opentelemetry-android-bom:0.16.0-alpha"))
implementation("io.opentelemetry.android:android-agent") // Version is resolved through the BOM
//...
}In addition to exposing the OTel Java API for manual instrumentation, agent also offers the following features:
- Streamlined initialization and configuration of the Java SDK instance
- Installation and management of bundled instrumentation
- Offline buffering of telemetry via disk persistence
- Redact and change span attributes before export
The following instrumentations are bundled with the Android Agent:
- Crash reporting
- ANR detection
- Network change detection
- Activity lifecycle
- Fragment lifecycle
- View click
- Slow/frozen frame render detection
See the following pages for details about the related topics:
For an overview of how to contribute, see the contributing guide in CONTRIBUTING.md.
We are also available in the #otel-android channel in the CNCF Slack. Please join us there for further discussions.
- Cesar Munoz, Elastic
- Jason Plumb, Splunk
For more information about the maintainer role, see the community repository.
- Hanson Ho, Embrace
- Jamie Lynch, Embrace
- Manoel Aranda Neto, PostHog
For more information about the Approver role, see the community repository.