---
title: Google Cloud Firestore monitoring integration
source: https://docs.newrelic.com/docs/infrastructure/google-cloud-platform-integrations/gcp-integrations-list/google-cloud-firestore-monitoring-integration
---

[New Relic integrations](https://docs.newrelic.com/docs/infrastructure/introduction-infra-monitoring) with the [Google Cloud Platform (GCP)](https://cloud.google.com/) include one that reports [Google Cloud Firestore](https://cloud.google.com/firestore) data to New Relic. This document explains how to activate the GCP Firestore integration and describes the data it reports.

## Features

Firestore is Google Cloud's serverless, fully managed NoSQL document database. New Relic Firestore integration collects API request, document read/write, and quota metrics at instance scope, plus request-level metrics attached to the Datastore-compatible request resource.

## Activate integration [#activate]

To enable the integration, follow standard procedures to [connect your GCP service to New Relic](https://docs.newrelic.com/docs/connect-google-cloud-platform-services-infrastructure):

-   [Connect with Workload Identity Federation (recommended)](https://docs.newrelic.com/docs/connect-google-cloud-platform-services-infrastructure)
-   [Connect with service account or user account](https://docs.newrelic.com/docs/connect-google-cloud-platform-services-infrastructure)

## Polling frequency [#polling]

New Relic integrations query your GCP services according to a polling interval that varies by integration. The polling frequency for Google Cloud Firestore is 5 minutes. The resolution is 1 data point every minute.

## Workload Identity Federation [#wif]

### Find and use data [#find-data-wif]

After you enable the integration, your Firestore resources appear as entities in the New Relic entity explorer. To see dashboards and manage services, go to [one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities) > Infrastructure > GCP.

All Firestore metrics available in GCP Cloud Monitoring are collected as dimensional metrics in the `Metric` event type. Additional metrics beyond this table are collected automatically. See [Google's Firestore metrics documentation](https://cloud.google.com/monitoring/api/metrics_gcp_d_h#gcp-firestore) for the complete list.

#### Entities

**Firestore entities**

| Entity   | Entity type            | Resource type        |
| -------- | ---------------------- | -------------------- |
| Request  | `GCPFIRESTOREREQUEST`  | `datastore_request`  |
| Instance | `GCPFIRESTOREINSTANCE` | `firestore_instance` |

### Metric data [#metrics-wif]

#### Key metrics — Request

| Metric name                           | Unit    | Description                                                                       |
| ------------------------------------- | ------- | --------------------------------------------------------------------------------- |
| `gcp.firestore.api.request_count`     | Count   | Number of Firestore API requests, faceted by `api_method` and `response_code`.    |
| `gcp.firestore.api.request_latencies` | Seconds | Server request latency distribution, faceted by `api_method` and `response_code`. |

#### Key metrics — Instance

| Metric name                                                | Unit    | Description                                                                                      |
| ---------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------ |
| `gcp.firestore.document.read_count`                        | Count   | Number of documents read via the Firestore API.                                                  |
| `gcp.firestore.document.write_count`                       | Count   | Number of documents written via the Firestore API.                                               |
| `gcp.firestore.document.delete_count`                      | Count   | Number of documents deleted via the Firestore API.                                               |
| `gcp.firestore.network.snapshot_listeners`                 | Count   | Number of active real-time snapshot listeners on the Firestore instance.                         |
| `gcp.firestore.network.active_connections`                 | Count   | Number of active client connections to the Firestore instance.                                   |
| `gcp.firestore.rules.evaluation_count`                     | Count   | Number of Firestore Security Rule evaluations performed against the instance, faceted by result. |
| `gcp.firestore.document.ttl_deletion_count`                | Count   | Number of documents deleted by TTL policies on the Firestore instance.                           |
| `gcp.firestore.document.ttl_expiration_to_deletion_delays` | Seconds | Delay between TTL expiration and the corresponding document deletion.                            |

For the complete list of Firestore metrics, see [Google's Firestore metrics documentation](https://cloud.google.com/monitoring/api/metrics_gcp_d_h#gcp-firestore).

### Metrics-only resource types [#metrics-only]

New Relic also collects metrics for the following Firestore resource types. These resource types don't create entities in the entity explorer, so query their metrics directly on the `Metric` event type.

**Database — 28 metrics**

| Metric name                                                       | Unit    | Description                                                                                                                                                                                                                                                                                                  |
| ----------------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `gcp.firestore.composite_indexes_per_database`                    | Count   | Current number of composite indexes per database.                                                                                                                                                                                                                                                            |
| `gcp.firestore.document.ttl_deletion_count`                       | Count   | Total count of documents deleted by TTL services.                                                                                                                                                                                                                                                            |
| `gcp.firestore.document.ttl_expiration_to_deletion_delays`        | Seconds | Time elapsed between when a document with a TTL expired, and when it was actually deleted.                                                                                                                                                                                                                   |
| `gcp.firestore.quota.composite_indexes_per_database.exceeded`     | Count   | Number of attempts to exceed the limit on quota metric `firestore.googleapis.com/composite_indexes_per_database`.                                                                                                                                                                                            |
| `gcp.firestore.quota.composite_indexes_per_database.limit`        | Count   | Current limit for this quota.                                                                                                                                                                                                                                                                                |
| `gcp.firestore.quota.composite_indexes_per_database.usage`        | Count   | Current usage for this quota.                                                                                                                                                                                                                                                                                |
| `gcp.firestore.api.billable_read_units`                           | Count   | The number of billable read units. These metrics are only available for Firestore databases with Enterprise Edition.                                                                                                                                                                                         |
| `gcp.firestore.api.billable_realtime_read_units`                  | Count   | The number of billable real-time read units. This metric is only available for Firestore databases with Enterprise Edition.                                                                                                                                                                                  |
| `gcp.firestore.api.billable_write_units`                          | Count   | The number of billable write units. This metric is only available for Firestore databases with Enterprise Edition.                                                                                                                                                                                           |
| `gcp.firestore.api.request_count`                                 | Count   | Count of Firestore API calls.                                                                                                                                                                                                                                                                                |
| `gcp.firestore.api.request_latencies`                             | Seconds | Non-streaming Firestore v1, Datastore v1 and Datastore v3 request latencies from the frontend.                                                                                                                                                                                                               |
| `gcp.firestore.document.billable_managed_delete_write_units`      | Count   | The number of billable managed delete write units. This metric is only available for Firestore databases with Enterprise Edition.                                                                                                                                                                            |
| `gcp.firestore.document.delete_ops_count`                         | Count   | The number of successful document deletes.                                                                                                                                                                                                                                                                   |
| `gcp.firestore.document.read_ops_count`                           | Count   | The number of successful document reads from queries or lookups.                                                                                                                                                                                                                                             |
| `gcp.firestore.document.write_ops_count`                          | Count   | The number of successful document writes.                                                                                                                                                                                                                                                                    |
| `gcp.firestore.mcp.request_count`                                 | Count   | Count of Firestore MCP calls.                                                                                                                                                                                                                                                                                |
| `gcp.firestore.mcp.request_latencies`                             | Seconds | Distribution of latencies for Firestore MCP calls.                                                                                                                                                                                                                                                           |
| `gcp.firestore.network.active_connections`                        | Count   | The number of active connections. Each mobile client will have one connection. Each listener in admin SDK will be one connection.                                                                                                                                                                            |
| `gcp.firestore.network.active_ignite_connections`                 | Count   | The number of active ignite connections.                                                                                                                                                                                                                                                                     |
| `gcp.firestore.network.snapshot_listeners`                        | Count   | The number of snapshot listeners currently registered across all connected clients.                                                                                                                                                                                                                          |
| `gcp.firestore.query_stat.per_query.result_counts`                | Count   | Distribution of number of results yielded per query. Real-time queries are excluded. Note: This metric is for performance observability. It isn't relevant to billing calculations. To understand how read operations contribute to your bill, use `firestore.googleapis.com/document/read_ops_count`.       |
| `gcp.firestore.query_stat.per_query.scanned_documents_counts`     | Count   | Distribution of number of documents scanned per query. Real-time queries are excluded. Note: This metric is for performance observability. It isn't relevant to billing calculations. To understand how read operations contribute to your bill, use `firestore.googleapis.com/document/read_ops_count`.     |
| `gcp.firestore.query_stat.per_query.scanned_index_entries_counts` | Count   | Distribution of number of scanned index entries per query. Real-time queries are excluded. Note: This metric is for performance observability. It isn't relevant to billing calculations. To understand how read operations contribute to your bill, use `firestore.googleapis.com/document/read_ops_count`. |
| `gcp.firestore.rules.evaluation_count`                            | Count   | The number of Cloud Firestore Security Rule evaluations performed in response to write (create, update, delete) or read (get, list) requests.                                                                                                                                                                |
| `gcp.firestore.storage.backups_storage_bytes`                     | Bytes   | Per database total backup storage size(in bytes).                                                                                                                                                                                                                                                            |
| `gcp.firestore.storage.data_and_index_storage_bytes`              | Bytes   | Per database data and index storage size(in bytes).                                                                                                                                                                                                                                                          |
| `gcp.firestore.storage.pitr_storage_bytes`                        | Bytes   | Per database point in time recovery storage size(in bytes).                                                                                                                                                                                                                                                  |
| `gcp.firestore.field_configurations_per_database`                 | Count   | Current number of field configurations per database.                                                                                                                                                                                                                                                         |

## Service account or user account [#service-account]

### Find and use data [#find-data]

After activating the integration and waiting a few minutes (based on the [polling frequency](#polling)), data will appear in the New Relic UI. To [find and use your data](https://docs.newrelic.com/docs/infrastructure/integrations/find-use-infrastructure-integration-data), including links to your dashboards and alert settings, go to [one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities) > Infrastructure > GCP > (select an integration).

Data is attached to the following [event type](https://docs.newrelic.com/docs/data-apis/understand-data/new-relic-data-types/#event-data):

| Entity   | Event Type                   | Provider               |
| -------- | ---------------------------- | ---------------------- |
| Request  | `GcpFirestoreRequestSample`  | `GcpFirestoreRequest`  |
| Instance | `GcpFirestoreInstanceSample` | `GcpFirestoreInstance` |

For more on how to use your data, see [Understand and use integration data](https://docs.newrelic.com/docs/infrastructure/integrations/find-use-infrastructure-integration-data).

### Firestore Request data

| Metric        | Unit  | Description                   |
| ------------- | ----- | ----------------------------- |
| `api.Request` | Count | Count of Firestore API calls. |

### Firestore Instance data

| Metric                      | Unit  | Description                                                                                                                                   |
| --------------------------- | ----- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `document.Delete`           | Count | The number of successful document deletes.                                                                                                    |
| `document.Read`             | Count | The number of successful document reads from queries or lookups.                                                                              |
| `document.Write`            | Count | The number of successful document writes.                                                                                                     |
| `network.ActiveConnections` | Count | The number of active connections. Each mobile client will have one connection. Each listener in admin SDK will be one connection.             |
| `network.SnapshotListeners` | Count | The number of snapshot listeners currently registered across all connected clients.                                                           |
| `rules.Evaluation`          | Count | The number of Cloud Firestore Security Rule evaluations performed in response to write (create, update, delete) or read (get, list) requests. |
