LocalTelemetry
The TelemetryRepository composables report through: screen views, screen states, and the GA4 events a component logs for its own taps.
Components read it instead of taking it as a parameter, so a screen does not pass it to each one. ProvideTelemetry sets it; ShellHost and every Toolkit activity already call that. Where nothing provides it, as in a preview, it is NoOpTelemetryRepository and everything is dropped, so a composition the host starts outside ShellHost, such as its own dialog window, calls ProvideTelemetry to be reported.
Read it once at the top of a composable, the way Compose code reads LocalContext:
val telemetry = LocalTelemetry.current
telemetry.logEvent(...)Content copied to clipboard
Static because it is set once at the root and never changes, so reading it costs nothing.