Build-Time Auto-Instrumentation in Android
Talkat Observability Day North America 2024 · on Tuesday, 2024-11-12· at 14:40· Salt Palace | Level 2 | 255 B·
summary
Shows how OpenTelemetry build-time weaving uses the Byte Buddy Gradle plugin to inject instrumentation into Android APKs (demo adds one build line and a dependency) and wires four interceptors into OkHttp’s constructor so client traces link to a Jaeger backend. Build-time bytecode weaving operates on dex files and reliably produces linked client+server traces in the demo. Caveats: SDK initialization still requires manual setup, AGP compatibility gaps exist, and Compose / withSpan support is incomplete.
AI-written summary · about
chapters (14)
- 0:00Introduction
- 1:03Auto-instrumentation importance
- 3:08Java agent limitations
- 5:41Android build process
- 7:48BiteBuddy Gradle plugin
- 8:50Instrumenting third-party libraries
- 10:55Setting up and using the instrumentation plugin
- 11:17Live demo
- 13:25Demo results in Jaeger
- 16:16APK bytecode inspection
- 17:38Bytecode comparison
- 19:24Instrumentation challenges
- 20:47Roadmap and collaboration
- 21:31Q&A
related talks
42mOpenTelemetry on Android: From black box to X‑Ray
30mInstrument Your Java Applications with OpenTelemetry!
40mIntroduction to Bytecode Instrumentation with AGP 8
34mWhat's new in Android development tools
49mByteWeaver: Bytecode Instrumentation for the Greater Good
19mImplement auto instrumentation under GraalVM static compilation on OTel Java Agent
28mPractical Introduction to OpenTelemetry Tracing
31mAdvancing Observability With Compile-Time Auto-Instrumentation in Golang
