---
title: Google Cloud Firestore
description: >-
  A flexible, scalable database for mobile, web, and server development from
  Firebase and Google Cloud.
breadcrumbs: Docs > Integrations > Google Cloud Firestore
---

# Google Cloud Firestore

## Overview{% #overview %}

Google Cloud Firestore is a flexible, scalable database for mobile, web, and server development from Firebase and Google Cloud Platform.

Use the Datadog Google Cloud Platform integration to collect metrics from Google Cloud Firestore.

## Setup{% #setup %}

### Installation{% #installation %}

If you haven't already, set up the [Google Cloud Platform integration](https://docs.datadoghq.com/integrations/google-cloud-platform/) first. There are no other installation steps.

### Log collection{% #log-collection %}

Google Cloud Firestore logs are collected with Google Cloud Logging and sent to a Dataflow job through a Cloud Pub/Sub topic. If you haven't already, [set up logging with the Datadog Dataflow template](https://docs.datadoghq.com/integrations/google-cloud-platform/#log-collection).

Once this is done, export your Google Cloud Firestore logs from Google Cloud Logging to the Pub/Sub topic:

1. Go to the [Google Cloud Logging page](https://console.cloud.google.com/logs/viewer) and filter the Google Cloud Firestore logs.
1. Click **Create Export** and name the sink.
1. Choose "Cloud Pub/Sub" as the destination and select the Pub/Sub topic that was created for that purpose. **Note**: The Pub/Sub topic can be located in a different project.
1. Click **Create** and wait for the confirmation message to show up.

## Data Collected{% #data-collected %}

### Metrics{% #metrics %}

|  |
|  |
| **gcp.firestore.api.request\_count**(count)                                                 | Count of Firestore API calls.                                                                                                                                                                                                                                                                                                                  |
| **gcp.firestore.api.request\_latencies.avg**(count)                                         | The average non-streaming Firestore v1, Datastore v1, and Datastore v3 request latencies from the frontend.*Shown as second*                                                                                                                                                                                                                   |
| **gcp.firestore.api.request\_latencies.samplecount**(count)                                 | The sample count for non-streaming Firestore v1, Datastore v1, and Datastore v3 request latencies from the frontend.*Shown as second*                                                                                                                                                                                                          |
| **gcp.firestore.api.request\_latencies.sumsqdev**(count)                                    | The sum of squared deviation for non-streaming Firestore v1, Datastore v1, and Datastore v3 request latencies from the frontend.*Shown as second*                                                                                                                                                                                              |
| **gcp.firestore.composite\_indexes\_per\_database**(gauge)                                  | Current number of composite indexes per database.                                                                                                                                                                                                                                                                                              |
| **gcp.firestore.document.delete\_count**(count)                                             | The number of successful document deletes.                                                                                                                                                                                                                                                                                                     |
| **gcp.firestore.document.delete\_ops\_count**(count)                                        | The number of successful document deletes.                                                                                                                                                                                                                                                                                                     |
| **gcp.firestore.document.read\_count**(count)                                               | The number of successful document reads from queries or lookups.                                                                                                                                                                                                                                                                               |
| **gcp.firestore.document.read\_ops\_count**(count)                                          | The number of successful document reads from queries or lookups.                                                                                                                                                                                                                                                                               |
| **gcp.firestore.document.ttl\_deletion\_count**(count)                                      | Total count of documents deleted by TTL services.                                                                                                                                                                                                                                                                                              |
| **gcp.firestore.document.ttl\_expiration\_to\_deletion\_delays.avg**(count)                 | The average time elapsed between when a document with a TTL expired, and when it was actually deleted.*Shown as second*                                                                                                                                                                                                                        |
| **gcp.firestore.document.ttl\_expiration\_to\_deletion\_delays.samplecount**(count)         | The sample count for time elapsed between when a document with a TTL expired, and when it was actually deleted.*Shown as second*                                                                                                                                                                                                               |
| **gcp.firestore.document.ttl\_expiration\_to\_deletion\_delays.sumsqdev**(count)            | The sum of squared deviation for time elapsed between when a document with a TTL expired, and when it was actually deleted.*Shown as second*                                                                                                                                                                                                   |
| **gcp.firestore.document.write\_count**(count)                                              | The number of successful document writes.                                                                                                                                                                                                                                                                                                      |
| **gcp.firestore.document.write\_ops\_count**(count)                                         | The number of successful document writes.                                                                                                                                                                                                                                                                                                      |
| **gcp.firestore.field\_configurations\_per\_database**(gauge)                               | Current number of field configurations per database.                                                                                                                                                                                                                                                                                           |
| **gcp.firestore.network.active\_connections**(gauge)                                        | The number of active connections. Each mobile client will have one connection. Each listener in admin SDK will be one connection.                                                                                                                                                                                                              |
| **gcp.firestore.network.snapshot\_listeners**(gauge)                                        | The number of snapshot listeners currently registered across all connected clients.                                                                                                                                                                                                                                                            |
| **gcp.firestore.query\_stat.per\_query.result\_counts.avg**(count)                          | The average distribution of number of results yielded per query. Real-time queries are excluded. Note. This metric is for performance observability. It is not 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.result\_counts.samplecount**(count)                  | The sample count for distribution of number of results yielded per query. Real-time queries are excluded. Note. This metric is for performance observability. It is not 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.result\_counts.sumsqdev**(count)                     | The sum of squared deviation for distribution of number of results yielded per query. Real-time queries are excluded. Note. This metric is for performance observability. It is not 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.avg**(count)              | The average distribution of number of documents scanned per query. Real-time queries are excluded. Note. This metric is for performance observability. It is not 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.samplecount**(count)      | The sample count for distribution of number of documents scanned per query. Real-time queries are excluded. Note. This metric is for performance observability. It is not 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.sumsqdev**(count)         | The sum of squared deviation for distribution of number of documents scanned per query. Real-time queries are excluded. Note. This metric is for performance observability. It is not 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.avg**(count)         | The average distribution of number of scanned index entries per query. Real-time queries are excluded. Note. This metric is for performance observability. It is not 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.samplecount**(count) | The sample count for distribution of number of scanned index entries per query. Real-time queries are excluded. Note. This metric is for performance observability. It is not 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.sumsqdev**(count)    | The sum of squared deviation for distribution of number of scanned index entries per query. Real-time queries are excluded. Note. This metric is for performance observability. It is not relevant to billing calculations. To understand how read operations contribute to your bill, use `firestore.googleapis.com/document/read_ops_count`. |
| **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**(gauge)                      | Current limit on quota metric `firestore.googleapis.com/composite_indexes_per_database`.                                                                                                                                                                                                                                                       |
| **gcp.firestore.quota.composite\_indexes\_per\_database.usage**(gauge)                      | Current usage on quota metric `firestore.googleapis.com/composite_indexes_per_database`.                                                                                                                                                                                                                                                       |
| **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.                                                                                                                                                                                                  |

### Events{% #events %}

The Google Cloud Firestore integration does not include any events.

### Service Checks{% #service-checks %}

The Google Cloud Firestore integration does not include any service checks.

## Troubleshooting{% #troubleshooting %}

Need help? Contact [Datadog support](https://docs.datadoghq.com/help/).
