Firebase Performance Monitoring Automatic Traces

A trace is a report of performance data captured between two points in time in your app. When installed, the Performance Monitoring SDK automatically provides the following types of traces:

  • App start traces, which measure the time between when the user opens the app and when the app is responsive.
  • Screen traces, which span the lifetime of a screen and measure slow and frozen frames.
  • App in background traces, which measure the time when the app is running in the background.
  • App in foreground traces, which measure the time when the app is running in the foreground and available to the user.

Automatic trace definitions

Performance Monitoring uses method calls and notifications in your app to determine when each type of automatic trace starts and stops:

Trace Name iOS Android
App start Starts when the application loads the first Object to memory and stops after the first successful run loop that occurs after the application receives the UIApplicationDidBecomeActiveNotification notification. Starts when the app's FirebasePerfProvider ContentProvider completes its onCreate method and stops when the first activity's onResume() method is called. If the app was not cold-started by an activity (for example, by a service or broadcast receiver), no trace is generated.
Screen Starts for every UIViewController in the keyWindow when the app calls viewDidAppear:, and stops when the app calls viewDidDisappear:. Screen traces don't capture canonical container view controllers. Starts for every Activity class when the app calls onActivityStarted(), and stops when the app calls onActivityStopped().
App in background Starts when the application receives the UIApplicationWillResignActiveNotification notification and stops when it receives the UIApplicationDidBecomeActiveNotification notification. Starts when the last activity to leave the foreground has its onStop() method called and stops when the first activity to reach the foreground has its onResume() method called.
App in foreground Starts when the application receives the UIApplicationDidBecomeActiveNotification notification and stops when it receives the UIApplicationWillResignActiveNotification notification. Starts when the first activity to reach the foreground has its onResume() method called and stops when the last activity to leave the foreground has its onStop() method called.

See more details on trace samples

You can deep dive into segments of specific traces or network requests in the Firebase console. A random sampling of recorded sessions shows the following information:

an image of the Firebase Performance Monitoring sessions page

  • CPU: The Performance Monitoring SDK captures how much user time and system time your app consumes.
  • Memory: The Performance Monitoring SDK captures how much heap memory your app uses. Heap memory is the memory used for dynamic allocations, including objects created, objects deallocated, and objects that the app is actively using.
  • Individual information: Detailed information about a single instance of a trace or network request, including start time, end time, duration, request size, and response size.
  • Concurrent instances: Information about traces or network requests that happened at the same time.
  • Device attributes: Information about the device, including app version, model, OS version, radio, and custom attributes.

To see these detailed samples in the Firebase console, open one of your app's traces or network requests and click See sessions. Alternatively, click the link for an attribute's sessions from the specific attribute.

an image of the Firebase Performance Monitoring trace with a link to sessions

The sessions Performance Monitoring collects are distributed into percentiles for each metric. Sessions in lower percentile ranges have a lower value for the metric than sessions in higher percentile ranges. To filter the available sessions by percentile, use the percentiles dropdown above the sessions details.

an image of the Firebase Performance Monitoring sessions page

Send feedback about...

Need help? Visit our support page.