https://github.com/aws-observability/aws-otel-android
https://github.com/aws-observability/aws-otel-android
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/aws-observability/aws-otel-android
- Owner: aws-observability
- License: apache-2.0
- Created: 2025-04-08T20:49:15.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-12-09T10:04:07.000Z (8 months ago)
- Last Synced: 2026-01-11T19:37:43.076Z (6 months ago)
- Language: Kotlin
- Size: 2.44 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Notice: NOTICE
Awesome Lists containing this project
README
# AWS Distro for OpenTelemetry - Android
[](https://opensource.org/licenses/Apache-2.0)
## Overview
This repo contains the AWS Distro for OpenTelemetry (ADOT) on Android. It is a bundle that ships a few things out of the box:
1. OpenTelemetry Java SDK (https://github.com/open-telemetry/opentelemetry-java)
2. OpenTelemetry Android automated instrumentation (https://github.com/open-telemetry/opentelemetry-android)
- This includes instrumentation for telemetry like ANRs, Crashes, Activity lifecycle, etc
4. Additional automated instrumentation not currently part of upstream OpenTelemetry Android, like the "Time to first draw" telemetry
5. AWS-specific exporter and auth configuration that works out of the box when exporting telemetry to AWS CloudWatch Real User Monitoring (RUM)
The distro is preconfigured for seamless integration with [AWS CloudWatch RUM](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM.html).
**Key Benefits:**
- **Zero-code instrumentation** for most common Android telemetry
- **AWS-native integration** with CloudWatch RUM and Application Signals
- **Production-ready** with minimal performance overhead
- **Comprehensive monitoring** including crashes, ANRs, UI performance, and network requests
- **Flexible configuration** supporting both programmatic and configuration file setup
## Quick Start
### 1. Add Dependencies
Add to your app's `build.gradle`. For a Kotlin DSL example:
```kotlin
dependencies {
// For automatic instrumentation (recommended; see below for programmatic configuration)
implementation("software.amazon.opentelemetry.android:agent:1.0.0")
// For HTTP instrumentation with ByteBuddy
byteBuddy("io.opentelemetry.android.instrumentation:okhttp3-agent:0.15.0-alpha") // if you are using OkHttp-3.0
byteBuddy("io.opentelemetry.android.instrumentation:httpurlconnection-agent:0.15.0-alpha") // if you are using URLConnection / HttpURLConnection / HttpsURLConnection
}
```
### 2. Configuration
#### Option A: Zero-Code Configuration (Agent)
Create `res/raw/aws_config.json`:
```jsonc
{
"aws": {
"region": "",
"rumAppMonitorId": "",
// optional, if you have a resource-based policy with an alias
"rumAlias": "