Set up alerts for performance issues

Use Performance Monitoring alerts to notify project members if code changes or network requests are degrading the performance of your app.

You can set up and customize alerts for your app, which notify you when the performance of an event crosses a set threshold.

What triggers an alert?

An alert is triggered when a metric for your app crosses a threshold that you define for a specified percentile (if applicable) in the Firebase console. Alerts are triggered only if your app uses a real-time compatible SDK version.

app start time

When you configure an alert for app start time, the alert is triggered if all of the following conditions are true:

  • Firebase recorded at least 100 samples of the _app_start trace for the latest version of your app in the last hour.
  • The duration of the _app_start trace exceeded the app's defined threshold during the last hour and for the configured percentile.
  • There was no alert previously raised for the same threshold in the latest version of your app.

custom code traces

When you configure an alert for a custom code trace metric, the alert is triggered if all of the following conditions are true:

  • Firebase recorded at least 100 samples of the custom code trace for the latest version of your app in the last hour.
  • The duration of the trace exceeded the app's defined threshold during the last hour and for the configured percentile.
  • (For iOS+ and Android only) There was no alert previously raised for the same threshold in the latest version of your app.
  • (For web only) There was no alert previously raised for the same threshold in the past 3 days.

network requests

When you configure an alert for a network request metric, the alert is triggered if all of the following conditions are true:

  • Firebase recorded at least 100 samples that matched to the URL pattern across all versions of your app in the last hour.
  • The metric's aggregated value crossed the defined threshold during the last hour:
    • response time: the aggregated value exceeded the set threshold for the configured percentile
    • success rate: (for iOS+/Android only) the aggregated value went below the set threshold across all users
  • There was no alert previously raised for the same threshold in the past 3 days.

screen rendering

When you configure an alert for a screen rendering metric, the alert is triggered if all of the following conditions are true:

  • Firebase recorded at least 100 samples samples of screen rendering for the latest version of your app in the last hour.
  • The metric's aggregated value crossed the defined threshold during the last hour:
    • frozen frames: the aggregated value exceeded the set threshold
    • slow frames: the aggregated value exceeded the set threshold
  • There was no alert previously raised for the same threshold in the latest version of your app.

page loads

When you configure an alert for a page load metric, the alert is triggered if all of the following conditions are true:

  • Firebase recorded at least 100 samples of the page loading for your app in the last hour.
  • The metric's aggregated value crossed the defined threshold during the last hour and for the configured percentile:
    • first input delay: the aggregated value exceeded the set threshold and the configured percentile
    • first contentful paint: the aggregated value exceeded the set threshold and the configured percentile
    • first paint: the aggregated value exceeded the set threshold and the configured percentile
  • There was no alert previously raised for the same threshold in the past 3 days.

Learn more about configuring alerts, default percentiles, and best practices for setting up alerts for specific types of traces and metrics.

Alerts for other performance metrics or for built-in Firebase integrations with Slack, Jira, and PagerDuty are not available for Performance Monitoring alerts.

Receive alerts

Get default alerts

By default, Firebase can send Performance Monitoring alerts via email.

To receive Performance Monitoring alerts via this default mechanism, you must have the firebaseperformance.config.update permission. The following roles include this required permission by default:

Alerts and their settings are project-wide. This means that, by default, every project member (who is not an email group and has the required permissions to receive alerts) will get an email when a performance alert is triggered.

Turn on/off alerts for your own account

For your own account, you can turn on/off Performance Monitoring alerts without affecting other project members. Note that you still need the required permissions to receive alerts.

To turn Performance Monitoring alerts on or off, follow these steps:

  1. In the Firebase console, in the top right-corner, go to Firebase alerts.
  2. Then, go to Settings and set your account preference for Performance Monitoring alerts.

Set up advanced alerting to third-party services

You can also send Performance Monitoring alerts to your team's preferred notification channel, using Cloud Functions for Firebase. For example, you can write a function that captures an alert event for slow app start time and posts the alert information to a third-party service, like Discord, Slack, or Jira.

To set up advanced alerting capabilities using Cloud Functions for Firebase, follow these steps:

  1. Set up Cloud Functions for Firebase, which includes the following tasks:

    1. Set up a development environment for Node.js or Python.
    2. Install and sign into the Firebase CLI.
    3. Initialize Cloud Functions for Firebase using the Firebase CLI.
  2. Write and deploy a function that captures an alert event from Performance Monitoring and handles the event payload (for example, posts the alert information in a message on Discord).

To learn about all the performance alert events that you can capture, go to the reference documentation for Performance Monitoring alerts.

Automatic removal of invalid alerts

Performance Monitoring validates alerts to ensure that data is valid and that alerts are in active use. Alerts are considered valid if one of the following is true:

  • The alert is created for a Resource ID for which Performance Monitoring received data in the last 90 days.
  • The alert was created recently for a custom URL pattern. After you create a custom URL pattern and set up an alert, you have 90 days to send data for that pattern. If no data is sent within the 90-day time period, Performance Monitoring removes that alert. For more information about custom URL patterns, see Aggregate data under customer URL patterns.

If either of these conditions is not met, Performance Monitoring removes the alert.

Configure an alert

To configure Performance Monitoring alerts, you must have the firebaseperformance.config.update permission. The following roles include this required permission by default: Firebase Performance Admin, Firebase Quality Admin, Firebase Admin, and project Owner or Editor.

If you haven't already done so, add the latest Performance Monitoring SDK to your app. For more information, see get started guides for the web, Android, Apple, and Flutter platforms.

In each of your registered apps, use the Traces table or the Dashboard report card to configure an alert for each metric that you want to monitor. Each app can have a different set of alerts, each with a different threshold (or have no alerts at all).

Configure an alert in the Traces table

  1. Go to the Performance Monitoring Dashboard tab in the Firebase console, and then select the app for which you want to configure an alert.

  2. Scroll down to the Traces table at the bottom of the screen.

  3. Select the tab of the trace type for which you want to set an alert, and then find the applicable row.

  4. At the far right of the row, open the Overflow Menu () and select Alert settings.

  5. Follow the on-screen instructions to set the alert threshold and the percentile (if applicable) for the app, or to turn on/off the alert. The default percentiles are 90th for Android and iOS, and 75th for Web. To learn more about default percentiles, see Track key metrics in your dashboard.

Configure an alert in the Dashboard report card

  1. Go to the Performance Monitoring Dashboard tab in the Firebase console, and then select the app for which you want to configure an alert.

  2. In the Report card tab, locate the metric card for which you want to configure an alert.

  3. In the desired metric card, open the Overflow Menu () and select Alert settings.

  4. Follow the on-screen instructions to set the alert threshold and the percentile (if applicable) for the app, or to turn on/off the alert. The default percentiles are 90th for Android and iOS, and 75th for Web. To learn more about default percentiles, see Track key metrics in your dashboard.

Best practices for setting a performance alert

Network requests

Firebase aggregates the data from similar network requests under URL patterns, which can be either of the following:

  • User-defined patterns, which are called custom URL patterns.

  • Firebase-derived patterns, which are called automatic URL patterns.
    These patterns may change over time based on your app’s latest usage behavior.

Set up alerts for your custom URL patterns

We recommend setting up alerts for any custom URL patterns that you've configured. Since Firebase attempts to match a request to a custom URL pattern first, similar requests are more consistently mapped to the same URL pattern. This makes alerts for a custom URL pattern more meaningful and effective for your team, because you've already identified that specific pattern of requests as important to your app.

Set up alerts for automatic URL patterns

When setting up an alert for an automatic URL pattern, ensure that the automatic URL pattern has stabilized for a few days. Keep in mind that automatic URL patterns may change over time, and alert configurations do not carry over to new URL patterns. This could result in incorrect or missing alerts for the patterns you care about. You can also consider creating a custom URL pattern to ensure that this pattern is stable.

Web page loads

To learn recommended thresholds for measuring web metrics, see the Core Web Vitals documentation.

Screen renderings

To ensure an optimal app experience, user sessions should be free of slow and frozen frames. Performance Monitoring recommends that you set up alerts for frozen frames greater than 1% and that you set up alerts for slow frames exceeding 5%. You will find that these values are present as the default settings during performance alert configuration. To learn more about excessive slow or frozen frames and other app performance best practices, see the Google Play guidance.