Firebase Performance Monitoring
Gain insight into your app's performance issues.
You use the Performance Monitoring SDK to collect performance data from your app, then review and analyze that data in the Firebase console. Performance Monitoring helps you to understand where and when the performance of your app can be improved so that you can use that information to fix performance issues.
|Automatically measure app startup time, HTTP/S network requests, and more||When you integrate the Performance Monitoring SDK into your app, you don't need to
write any code before your app starts automatically monitoring several
critical aspects of performance.
For native apps, the SDK logs startup time, rendering data by screen, and activity while in the foreground or background. For web apps, the SDK logs aspects like first contentful paint, ability for users to interact with your app, and more.
|Gain insight into situations where app performance could be improved||Optimizing the performance of your app can be challenging when you don't know exactly why it is falling short of user expectations. That's why Performance Monitoring lets you see performance metrics broken down by attributes, like country, device, app version, and OS level.|
|Customize monitoring for your app||You can create custom traces to capture your app's performance in specific situations, like when you load a new screen or display a new interactive feature. And, you can create custom metrics to count events that you define (like cache hits) during those traces.|
How does it work?
Performance Monitoring is available for iOS, Android, and web apps that include the Performance Monitoring SDK. Performance Monitoring automatically monitors duration traces and HTTP/S network request traces in your app.
Automatic duration traces
A trace is a report of performance data captured between two points in time in your app. Performance Monitoring automatically includes several default duration traces.
For iOS and Android apps, automatic duration traces include:
app start traces — measures the time between when the user opens the app and when the app is responsive
app in foreground traces and app in background traces — offer insight into how your app performs when in the foreground or when idle
For web apps, the automatic duration trace is page load, which breaks down into the following metrics:
first paint and first contentful paint — measure when the browser starts to render your app versus when the user first sees actual content on the page
You can also configure custom traces. A custom trace is a report of performance data associated with some of the code in your app. You define the beginning and end of a custom trace using the Performance Monitoring API.
You can further configure a custom trace to record custom metrics for performance-related events that occur within its scope. For example, you can create a custom metric for the number of cache hits and misses or the number of times that the UI becomes unresponsive for a noticeable period of time.
HTTP/S network request traces
An HTTP/S network request trace is a report that captures the time between when your app issues a request to a service endpoint and when the response from that endpoint is complete. For any endpoint to which your app makes a request, Performance Monitoring captures several metrics:
Response time — Time between when the request is made and when the response is fully received
Payload size — Byte size of the network payload downloaded and uploaded by the app
Success rate — Percentage of successful responses compared to total responses (to measure network or server failures)
For both duration traces and HTTP/S network request traces, you can see performance monitoring data categorized as follows:
|Duration traces||HTTP/S network request traces|
|iOS and Android Apps|
You can also set up custom attributes to segment data by categories specific to your app.
|Add the Performance Monitoring SDK to your app||You can add the Performance Monitoring SDK to your app, along with any other
Firebase products that you want to use in your app.
iOS | Android | Web
Define custom traces and metrics for your app using the Performance Monitoring SDK
|Using the Performance Monitoring SDK, you can define custom traces and metrics to measure specific aspects of your app's performance.|
|Monitor performance data in the Firebase console||In the Firebase console, you can monitor performance data from your users to learn the specific situations where your app's performance could be improved. You can also break down the performance data by attributes, like app version, country, device, or OS.|
Performance Monitoring does not permanently store any personally identifiable information (such as names, email addresses, or phone numbers). While monitoring HTTP/S network requests, Performance Monitoring uses URLs (not including URL parameters) to build aggregated and anonymous URL patterns that are eventually persisted and shown in the Firebase console.
For a full list of data collected by Performance Monitoring, see Data collection.
To get started using Performance Monitoring in your app, visit: