Zero* Cost Observability: A Deep Dive into the Jetpack Multiplatform Tracing Library
summary
Library claims 10x faster than legacy ATrace (1.2 ms down to ~0.12 ms on Pixel 6A), emits Perfetto-format protos and supports swapping in custom back ends, and is KMP-ready for JVM + Android. Implementation uses zero allocations in the hot path via Wire mutable types and proto3, offloads serialization with coroutine intrinsics to reuse Dispatchers IO, and provides context propagation for coroutines plus a propagation token for callbacks. Benchmarks drive changes (atomics replaced, specialized collections, object pooling) and the end-to-end system demonstrably works in traces shown.
AI-written summary · about
chapters (11)
- 0:00Tracing on Android
- 0:45Prior tracing API limits
- 5:18New tracing 2.0 library
- 8:03Tracing API basics
- 9:26Metadata in trace events
- 10:08Overlapping and nested events
- 11:12Call stack in traces
- 11:54Async context propagation
- 16:04Zero-cost tracing abstractions
- 26:54Performance benchmarks
- 29:43Resources and closing
related talks
25mPerfect Match: Correlating Continuous Profiling with Distributed Tracing for Stronger Observability
34mClient Tracing At Scale
47mPerformance in a Kotlin World
45mPerformance in a Kotlin world
34mAdventures building a Kotlin Multiplatform Benchmarking Library
43mPerformance in a Kotlin World
04mSponsored Keynote: Zero-Code Observability: Close the Coverage Gaps That Cause Outa...
19mKeynote: OpenTracing and Containers: Depth, Breadth, and the Future of Tracing - Ben Sigelman
