Flows & UI Traces

Track user flows and UI traces in KMP APMKmp.

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