The repository contains the OpenTelemetry Android SDK for generating mobile client telemetry for real user monitoring (RUM). It is built on top of the OpenTelemetry Java SDK.
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.useFullClasspathForDexingTransform
property ingradle.properties
totrue
to ensure desugaring runs properly. For the full context for this workaround, please see this issue.
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.
To use this android instrumentation library 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 opentelemetry-android 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.12.0-alpha"))
implementation("io.opentelemetry.android:android-agent") // Version is resolved thru bom
//...
}
This android library builds on top of the OpenTelemetry Java SDK. Some of the additional features provided include:
- Crash reporting
- ANR detection
- Network change detection
- Android Activity lifecycle instrumentation
- Android Fragment lifecycle monitoring
- View click instrumentation
- Access to the OpenTelemetry APIs for manual instrumentation
- Helpers to redact any span from export, or change span attributes before export
- Slow / frozen render detection
- Offline buffering of telemetry via storage
Note: Use of these features is not yet well documented.
See CONTRIBUTING.md.
- Cesar Munoz, Elastic
- Jason Plumb, Splunk
For more information about the maintainer role, see the community repository.
- Hanson Ho, Embrace
- Manoel Aranda Neto, PostHog
For more information about the approver role, see the community repository.