Performance Monitoring uses traces to collect data about monitored processes in your app. A trace is a report that contains data captured between two points in time in your app.
For all app types, Performance Monitoring automatically collects a trace for each network request issued by your app, called an HTTP/S network request trace. These traces collect metrics for 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
Response payload size — Byte size of the network payload downloaded by the app
Request payload size — Byte size of the network payload uploaded by the app
Success rate — Percentage of successful responses compared to total responses (to measure network or server failures)
Performance Monitoring automatically collects metrics for network requests that use the following networking libraries:
This out-of-the-box monitoring includes most network requests for your app. However, some requests might not be reported or you might use a different library to make network requests. In these cases, you can use the Performance Monitoring API to manually instrument custom network request traces.
Data aggregation under URL patterns
Firebase Performance Monitoring automatically aggregates data for similar network requests to help you understand trends in your network request performance.
For each request, Firebase checks if the network request's URL matches a URL pattern. If the request URL matches a URL pattern, Firebase automatically aggregates the request's data under the URL pattern. Firebase displays URL patterns and their aggregated data in the Network tab in the Performance dashboard of the Firebase console.
What's a URL pattern?
A URL pattern contains a domain plus a pattern that can match a URL path, for
URL patterns can contain the following path segments:
- plain text — matches an exact string
*— matches any string in a single path segment
**— matches an arbitrary path suffix
URL patterns can be either:
For example: Any of the following URL requests could match the URL pattern
Firebase maps each request to only one URL pattern. If you've configured any custom URL patterns, Firebase attempts to match request URLs to those patterns first. If Firebase finds no matching custom URL pattern, then it matches a request URL to the most representative automatic URL pattern. Learn more about automatic and custom URL patterns in the following sections.
Automatic URL patterns
Without any configuration by you, Performance Monitoring attempts to reflect your app's latest usage behavior by matching your app's requests to automatic URL patterns.
How does automatic URL pattern matching work?
Firebase matches each request to the most representative automatic URL pattern that it has derived from requests sent by your app. Note, though, that Firebase attempts to match request URLs to any configured custom URL patterns first.
The following is a basic example for how Firebase attempts to match requests to the most representative automatic URL pattern for your app.
Your app sends many requests to URLs like:
Firebase determines that
example.com/germany/**is a common request pattern for your app and adds it as an automatic URL pattern in your project.
For any new matching requests to this URL pattern, Firebase aggregates the requests' data under the automatic URL pattern
After one week, the majority of your app's requests are to
example.com/germany/animals/birds. So, Firebase derives a more representative URL pattern of
For any new matching requests to this new URL pattern, Firebase aggregates the requests' data only under the new URL pattern. Firebase continues to aggregate data for requests to
However, over the next several weeks, your app's requests to
example.com/germany/animals/birdsdecrease substantially. Firebase determines that
example.com/germany/animals/**is not representative of your app's latest usage behavior, so Firebase starts matching these two requests back to
Firebase does not aggregate any further request data under
example.com/germany/animals/**because it's no longer the most representative automatic URL pattern.
Because automatic URL pattern matching is dynamic, be aware of the following:
Matches and aggregated data from previous requests aren't affected by new URL patterns. Firebase does not retroactively re-aggregate request data.
Only future requests are affected by new URL patterns. Firebase maps each new request to the most representative automatic URL pattern. Note, though, that Firebase attempts to match request URLs to any configured custom URL patterns first.
View automatic URL patterns and their data
The Performance dashboard of the console lists automatic URL patterns in the Network > All tab. You might see URL patterns with an Uncategorized label. These are "broad" automatic URL patterns under which Firebase can aggregate data for requests that don't match to any more specific URL pattern.
When the data retention period ends for the data aggregated under a URL pattern, Firebase deletes that data from the URL pattern. If all the data aggregated under an automatic URL pattern expires, then Firebase deletes that URL pattern from the Firebase console.
Custom URL patterns
You can create custom URL patterns to monitor specific URL patterns that Firebase isn't capturing with its derived automatic URL pattern matching. For example, you can use a custom URL pattern to troubleshoot a specific URL or to monitor a specific set of URLs over time.
Visit Create custom URL patterns to learn more.
Track, view, and filter performance data
Track specific metrics in your dashboard
Add your key metrics to your dashboard to learn how they're trending. You can quickly identify regressions by seeing week-over-week changes or verify that recent changes in your code are improving performance.
To add a metric to your dashboard, go to the Performance dashboard in the Firebase console, then click the Dashboard tab. Click an empty metric card, then select an existing metric to add to your dashboard. Click on a populated metric card for more options, like to replace or remove a metric.
The dashboard shows collected metric data over time, both in graphical form and as a numerical percentage change.
Learn more about using the dashboard.
View all traces and their data
To view these traces, go to the Performance dashboard in the Firebase console, then click the Network tab.
From the Network tab, you can click through various screens to explore a trace and
drill down into metrics of interest. On most pages, you can use the
- Filter by App version to view data about a past release or your latest release
- Filter by Device to learn how older devices handle your app
- Filter by Country to make sure your database location isn't affecting a specific region
Learn more about viewing data for your traces.
Learn more about using attributes to examine performance data.
Learn more about how to track performance issues in the Firebase console.
- View detailed reports of user sessions in which you can see a specific trace in a timeline context of other traces collected during the same session.