open-telemetry / opentelemetry-android

OpenTelemetry Tooling for Android
Apache License 2.0
114 stars 22 forks source link

Create Compose navigation instrumentation #361

Open breedx-splk opened 1 month ago

breedx-splk commented 1 month ago

The existing Activity and Fragment instrumentation via VisibleScreenTracker is nice and helpful RUM information. Some apps, however, use (Jetpack) Compose to build sophisticated UI structures, including @Composable components that behave (to the user) much like a Fragment or an Activity would.

Compose has a Navigation component that app authors can use to create user flows between these Compose style "screens". This navigation is not yet instrumented, and thus the current screen might appear to be reported incorrectly, if at all.

Not entirely sure yet what this should look like, but we should build Compose Navigation instrumentation.

LikeTheSalad commented 1 month ago

I agree. And I think it would be great if we could come up with a single api to instrument all kinds of screen types, kind of a VisibleScreenTracker but for all use cases, Activities, Fragments, and Compose alike.