Sentry Apr 21, 2023

How We Built User Interaction Tracking For Jetpack Compose

Article Summary

Markus Hintersteiner from Sentry reveals how they cracked a tricky problem: tracking user interactions in Jetpack Compose without cluttering developers' code or killing performance.

The Sentry team built automatic user interaction tracking for Jetpack Compose as part of their open-source Android SDK. This deep dive shows how they navigated Compose's internal APIs, avoided accessibility overhead, and delivered a feature that works out-of-the-box with minimal setup.

Key Takeaways

Critical Insight

Sentry shipped automatic Compose interaction tracking in SDK 6.10.0 by cleverly combining Window callbacks, LayoutNode traversal, and semantic modifiers without requiring reflection or accessibility services.

The team's workaround for mixing Java into a Kotlin Multiplatform module involves a surprising build system quirk that most developers don't know about.

Recent from Sentry

Related Articles