App performance monitoring provides insight into how an Android app is experienced on screen. This includes how long the app takes to become ready, which screens are shown, and how users move between them.
OneAgent for Android tracks this flow from the app start to in-app navigations between views, until the app is backgrounded or terminated.
OneAgent for Android captures the following concepts and stores them as events in Grail:
These concepts follow the general mobile RUM model described in Mobile RUM Concepts. For definitions, see Application start, Views and view summaries, and Navigations.
Each event consists of well-defined key-value fields as specified in the Semantic Dictionary for user events, including app_start.*, navigation.*, and view.*.
This data can be analyzed in apps such as Experience Vitals and Users & Sessions, or queried directly in Grail using DQL.
OneAgent for Android captures startup and lifecycle information automatically by registering for Android lifecycle callbacks (via ActivityLifecycleCallbacks). Based on this information, OneAgent can automatically detect views (currently limited to activities). For fragments, Jetpack Compose screens, or other UI components, views can be captured manually using Dynatrace.startView(...).
The App Start event measures how long it takes for an app to become ready after a startup or foreground transition.
OneAgent classifies app starts into three types: cold, warm, and hot (see Application start for definitions and examples).
On Android, classification is derived from process and Activity lifecycle signals (for example, whether the process needed to be created and whether the launching Activity is recreated).
In addition to being available as an app start event, an app start is also represented as a navigation event (a navigation without a source view).
OneAgent tracks app start based on Android lifecycle callbacks, capturing a sequence of phases such as:
Application initializationActivity.onCreateActivity.onStartActivity.onResumeTo capture the full app start duration, measurement must begin as early as possible. For auto-instrumented applications, OneAgent starts measuring in Application.onCreate. If automatic startup is disabled in the DSL or the agent is started manually, measurement begins only when the agent starts. In this case, calling Dynatrace.startup(...) as early as possible ensures accurate results. Otherwise, the reported duration may be shorter than the actual startup time.
A Navigation event represents a transition context between views, or a change in the app's visible state (see Navigations).
The Navigation event can have:
In the common case, the Navigation event acts as a glue event between two views.
Navigation events are generated for both automatic view tracking (activity-to-activity transitions) and manual view tracking (via Dynatrace.startView(...)).
In Dynatrace, a view represents a user-visible screen (see Views and view summaries).
For the field reference, see View attributes.
OneAgent tracks views automatically for activities. Other UI components can be tracked manually.
Only one view can be active at a time. Starting a new view automatically closes the previous one and triggers a navigation.
While the app is in the foreground, OneAgent for Android maintains a current view context. The view name is attached to events captured automatically (for example, web requests) and to events created via the Dynatrace APIs. This provides the screen context in which an event occurred.
For activities, OneAgent captures views based on lifecycle callbacks:
onResume.onPause.For UI components that are not auto-detected (such as fragments, Jetpack Compose screens, or custom views), use Dynatrace.startView(...):
Dynatrace.startView("Login")
Calling startView starts a new view and automatically ends the previously active view.
When a view ends, OneAgent creates a view summary, an aggregated event summarizing what happened during the view's lifetime (see Views and view summaries). View summaries are reported separately from other events.