For the complete documentation index, see llms.txt. This page is also available as Markdown.

Flows & UI Traces

Measure user journeys with named APMKmp flows and flow attributes in your KMP app, and track screens or modals with manual or automatic UI traces.

Flows (user journeys)

Start and end named flows to measure how long users spend on a journey:

Kotlin
APMKmp.startFlow("checkout")
// ... user goes through checkout ...
APMKmp.endFlow("checkout")

Add attributes to a flow for filtering or segmentation:

Kotlin
APMKmp.setFlowAttribute("checkout", "payment_method", "card")
APMKmp.setFlowAttribute("checkout", "discount", null)  // remove attribute

UI traces

Track a named UI operation (e.g. a screen or modal):

Kotlin
APMKmp.startUITrace("SettingsScreen")
// ... screen is visible ...
APMKmp.endUITrace()

Only one UI trace is active at a time; endUITrace() ends the current one.

Automatic UI traces

You can enable or disable automatic UI trace tracking:

Kotlin
APMKmp.setAutoUITraceEnabled(true)

Last updated