Use the Cloud Monitoring dashboard

This page describes how to use a Cloud Monitoring dashboard to viewavailable metrics, create a custom dashboard, and set alerts.

View Firestore metrics

To view the different Firestore metrics and create charts, useone the following:

  • TheMonitoring page in the Firestore section of the Google Cloud console.This page includes a pre-defined monitoring dashboard. You can also createup to one custom dashboard. To access theMonitoring page for a database, follow these steps:

    1. In the Google Cloud console, open the FirestoreDatabases page.

      Go to Databases

    2. Select a database from the list.

    3. In the navigation menu, clickMonitoring to open a dashboard.

  • The metrics explorer within Cloud Monitoring in Google Cloud console. For moreinformation about creating charts, seeCreate charts with Metrics Explorer.

View the Cloud Monitoring dashboard

In Cloud Monitoring, custom dashboards allow you to display information thatis relevant to you in an organized way. For example, you might create adashboard to display the performance metrics and alerting policies for yourproject in your production environment.

For more information about setting up a custom dashboard, seeManage custom dashboard andAdd dashboard widgets.

Monitor error rates

You can create a monitoring dashboard to monitor error rates and ensure availability of your database. Availability refers to the rate at which your database responds within an expected timeframe with a successful status code. TheFirestore SLA defines the specific details of what is classified as a valid request.

The error rate is determined by dividing the number of requests that resulted in an error response by the total number of requests sent.

An example dashboard for calculating error rates can be created by calculating the A/B ratio forapi/request_count of valid requests with4xx or5xx error codes contrasted with theapi/request_count of all valid requests.

 Understand availability with error rate
Figure 1. Understand availability with error rate.

In figure 1, you can see how to visualize the error rate ratio using theapi/request_count metrics in the Metrics explorer.

Create an alerting policy

Cloud Monitoring allows you to createalerts to notify you when a change in a metric condition occurs. You can use these alerts to be notified of potential problems before they impact your users.

For more information about creating alerts, seeCreate metric-threshold alerting policies.

Consider the following example where we create a latency alert policy. Thealerting policy checks p99 latency over a 5 minute rolling window. If the p99 latency stays above 250ms for 5 minutes, the alert is triggered.

Console

  1. In the Google Cloud console, go to theMonitoring page then select Alerting.

    Go to Monitoring

  2. SelectCreate policy.

  3. Select theRequest Latencies metric from theConsumed API resource.

  4. Add a service filter forfirestore.googleapis.com for Firestore in Native mode databases.

    Select the api/request_latencies metric to create trigger.
  5. ClickNext to configure the trigger.

  6. Select theCondition Types asThreshold.

    A threshold condition is set to a threshold value of 250ms. An alert is triggered when the p99 latency value stays the same for the entire period of the rolling window (5 min).

    Add the threshold for the metric.
  7. Set theThreshold value as250.

  8. ClickNext to configure notifications.

  9. Set the alert policy name and clickNext.

  10. Review the alert configurations and clickCreate Policy.

MQL

You can implement the same latency alert policy using a Monitoring Query Language (MQL) query. For more examples of using MQL, seeSample MQL queries.

fetchconsumed_api|metric'serviceruntime.googleapis.com/api/request_latencies'|filter(resource.service=='firestore.googleapis.com')|group_by5m,[value_request_latencies_percentile:percentile(value.request_latencies,99)]|every5m|conditionval() >0.25's'

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-18 UTC.