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 Performance dashboard of the Firebase console.
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.
How does custom URL pattern matching work?
Firebase attempts to match request URLs to any configured custom URL patterns before falling back to automatic URL pattern matching. For any matching requests to a custom URL pattern, Firebase aggregates the requests' data under the custom URL pattern.
If a request's URL matches more than one custom URL pattern, Firebase maps the
request to the most specific custom URL pattern only, according to the
following specificity order: plain text >
** from left to
right in the path. For example, a request to
two custom URL patterns:
However, the pattern
example.com/books/* is the most specific matching URL pattern because the
example.com/books/* takes precedence over the
When you create a new custom URL pattern, be aware of the following:
Matches and aggregated data from previous requests aren't affected by creating a new custom URL pattern. Firebase does not retroactively re-aggregate request data.
Only future requests are affected by creating a new custom URL pattern. You might need to wait up to 12 hours for Performance Monitoring to collect and aggregate data under a new custom URL pattern.
Create a custom URL pattern
Create a custom URL pattern from the Performance dashboard of the console in the Network tab. A project member must be an Owner or Editor to create a new custom URL pattern; however, all project members can view custom URL patterns and their aggregated data.
You can create up to 400 total custom URL patterns per app and up to 100 custom URL patterns per domain for that app.
To create a custom URL pattern, start with a domain, then use the following path segment syntax to create a pattern that can match URL paths.
- plain text — matches an exact string
*— matches any string in a single path segment
**— matches an arbitrary path suffix
The following table describes some potential custom URL pattern matching.
|To match...||Create a custom URL pattern like...||Example matches to this URL pattern|
|An exact URL||
|Any single path segment (
Note: This pattern will not match
|An arbitrary path suffix (
View custom URL patterns and their data
The Performance dashboard of the console lists custom URL patterns that have aggregated data in both the Network > All tab and the Network > Custom tab. If a custom URL pattern doesn't have any aggregated data, then it only appears in the Network > Custom tab.
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 a custom URL pattern expires, then Firebase does not delete the custom URL pattern from the Firebase console. Instead, Firebase continues to list "empty" custom URL patterns in the Network > Custom tab.
Remove a custom URL pattern
Unlike an automatic URL pattern, you can remove custom URL patterns from your project.
From the Performance section of the console, go to the Network > Custom tab.
Hover over the row of the custom URL pattern that you want to remove.
Clickat the far right of the row, then confirm the removal in the dialog.
When you remove a custom URL pattern, be aware of the following:
Any future requests are mapped to the next most specific matching custom URL pattern. If Firebase finds no matching custom URL patterns, then it falls back to automatic URL pattern matching.
Matches and aggregated data from previous requests aren't affected by removing a custom URL pattern.
You can still access a removed custom URL pattern and its aggregated data in the Network > All tab until the end of the applicable data retention period. When all the aggregated data under the removed custom URL pattern expires, Firebase deletes the custom URL pattern.
The Network > Custom tab does not list any removed custom URL patterns.