Google Cloud Firestore monitoring integration
Monitor your Google Cloud Firestore databases to track request rates, read/write/delete throughput, query performance, billable usage units, storage consumption, and security rule evaluations. Google Cloud Firestore monitor lets you maintain a responsive, cost-efficient NoSQL database.
Benefits
Monitoring Firestore ensures that your service remains reliable, secure, and high-performing. Key benefits include:
- Identify latency spikes or error surges before they impact your application.
- Track billable read, write, and delete units to fine-tune cost efficiency.
- Automated alerts and IT automation help maintain SLA compliance and reduce downtime.
- Consolidate Firestore metrics with other GCP services for a single pane of glass view.
- Bulk configuration and agent upgrades ensure smooth monitoring across multiple databases.
Use cases
Here are some use cases where Google Cloud Firestore monitoring will be helpful:
- Monitor request latency percentiles to detect performance degradation in real time.
- Capture composite index usage trends to quickly identify approaching index limits.
- Visualize read, write, and delete rates to plan capacity and optimize scaling.
- Set thresholds for error counts and request latency to ensure contractual obligations are met.
- Track TTL deletion delays to strengthen data lifecycle management.
- Integrate Firestore monitoring with other GCP services (Cloud Functions, App Engine, Cloud Run) for holistic visibility.
Setup and configuration
- Adding Google Cloud Firestore while configuring a new Google Cloud monitor
If you have not configured a Google Cloud monitor yet, add one by following the steps below:
- Go to Cloud > GCP > Add GCP Monitor or Admin > Cloud Monitoring > Google Cloud Platform (GCP).
- Provide a unique display name for identification purposes.
- Upload the JSON file that contains the private key of the service account to authenticate and perform resource discovery.
- Select Firestore from the Select the Resources for Monitoring list.
- Select existing Notification Profiles, User Alerts Groups, Tags, and IT Automation Templates or add new ones. You can also integrate alarms with your preferred third-party service.
- Click Start GCP Monitoring.
- Adding Google Cloud Firestore to an existing Google Cloud monitor
If you already have a Google Cloud monitor configured for the service account, you can add Google Cloud Firestore by following the steps below:
- Go to Cloud > GCP and select your GCP monitor.
- Click the hamburger
icon next to Service View and select Edit, which brings you to the Edit GCP Monitor page. - On the Edit GCP Monitor page, select Firestore from the Select the Resources for Monitoring list and click Save.
- After successful configuration, go to Cloud > GCP > Firestore. Now you can view the discovered Google Cloud Firestore resources.
It will take approximately five minutes to discover new GCP resources.
Licensing
Each Google Cloud Firestore monitor consumes one basic monitor license.
Polling frequency
Google Cloud Firestore monitor collects minute-wise metric data, and the statuses of your Google Firestore resources are reported every five minutes. Firestore metrics arrive with about a 4-minute delay. Storage metrics (Data and Index Storage, backups, PITR) are updated by Google only a few times a day, so their charts change slowly.
Supported metrics
| Metric name | Description | Statistic | Unit |
|---|---|---|---|
| API Requests per Second | The rate of API requests made to this Firestore database. | Total | Count/second |
| Document Reads | The rate of document read operations on this database. | Total | Count/second |
| Document Writes | The rate of document write operations on this database. | Total | Count/second |
| Document Deletes | The rate of document delete operations on this database. | Total | Count/second |
| Data And Index Storage | The total storage consumed by document data and indexes in this database. | Average | Bytes |
| API Request Latency (p50, seconds) | The median (50th percentile) latency of API requests to this database. | Average | Seconds |
| Error Count | The number of API requests that returned any response code other than success. | Total | Count |
| Request Latency (p95) | The 95th percentile latency of API requests to this database. | Average | Seconds |
| Request Latency (p99) | The 99th percentile latency of API requests to this database. | Average | Seconds |
| TTL Deletions | The number of documents automatically deleted by the Time-to-Live (TTL) policy. | Total | Count |
| TTL Expiration to Deletion Delay (p95) | The 95th percentile delay between a document's TTL expiration and its actual deletion. | Average | Seconds |
| Billable Read Units | The number of billable read units consumed on this database. | Total | Count |
| Billable Real-time Read Units | The number of billable read units consumed by realtime (snapshot listener) reads. | Total | Count |
| Billable Write Units | The number of billable write units consumed on this database. | Total | Count |
| Billable Managed Delete Write Units | The number of billable write units consumed by TTL-managed deletes. | Total | Count |
| Backups Storage Size | The total storage consumed by scheduled backups of this database. | Average | Bytes |
| PITR Storage Bytes | The total storage consumed by point-in-time recovery (PITR) data for this database. | Average | Bytes |
| Active Connections | The number of active client connections to this database. | Average | Count |
| Active Ignite Connections | The number of active connections using the Firestore in Datastore mode (Ignite) API. | Average | Count |
| Snapshot Listeners | The number of active realtime snapshot listeners on this database. | Average | Count |
| Results per Query (p95) | The 95th percentile number of results returned per query. | Average | Count |
| Documents Scanned per Query (p95) | The 95th percentile number of documents scanned per query. | Average | Count |
| Index entries Scanned per Query (p95) | The 95th percentile number of index entries scanned per query. | Average | Count |
| Security Rule Evaluations | The number of Firestore Security Rules evaluations performed. | Total | Count |
| Composite Indexes Used | The number of composite indexes currently used in this database. | Average | Count |
| Composite Index Limit | The maximum number of composite indexes allowed in this database. | Average | Count |
| Composite Index Limit Exceeded Attempts | The number of times an attempt to create a composite index exceeded the allowed limit. | Total | Count |
Configuration details
| Attribute | Description |
|---|---|
| Resource Name | The database ID of the Firestore database. Most projects have a database called (default), and the monitor is named after that ID. |
| Database Mode | The database mode (Native mode or Datastore mode). Possible values: FIRESTORE_NATIVE or DATASTORE_MODE. |
| Edition | The edition of this Firestore database (Standard or Enterprise). |
| Location | The region or multi-region location of this database. |
| Concurrency Mode | The transaction concurrency control mode used by this database. Possible values: OPTIMISTIC, PESSIMISTIC or OPTIMISTIC_WITH_ENTITY_GROUPS. |
| Realtime Updates Mode | Indicates whether realtime updates (snapshot listeners) are enabled for this database. |
| App Engine Integration Mode | Indicates whether App Engine integration is enabled for this database. |
| Point-in-Time Recovery Enablement | Indicates whether point-in-time recovery is enabled for this database. |
| Version Retention Period | The duration for which previous document versions are retained shown in seconds. |
| Delete Protection State | Indicates whether delete protection is enabled for this database. |
| Free Tier | Indicates whether this database is using the free tier. |
| UID | The unique identifier assigned to this database. |
| Create Time | The date and time this database was created. |
| Update Time | The date and time this database was last updated. |
Composite Indexes
This tab lists the database’s composite indexes with Collection Group, Fields (for example, status Ascending, createdAt Descending), Query Scope and Status (Ready, Creating or Needs Repair). Firestore’s built-in __name__ field is hidden, as in the Firebase console.
Backup Schedules
This tab lists the database’s scheduled backups with Schedule ID, Recurrence (Daily, or Weekly with the day), Retention (in days), Creation date and Last Updated.
Threshold configuration
- Global configuration
- In the web client, go to the Admin section on the left navigation pane.
- Select Configuration Profiles from the left pane and select Threshold and Availability from the drop-down menu.
- Click Add Threshold Profile in the top-right corner.
- For Monitor Type, select Firestore.
- Specify the threshold values for the required metrics, then click Save.
- Monitor-level configuration
- In the web client, go to Cloud > GCP > Firestore.
- Select a resource you would like to set a threshold for, then click the hamburger
icon. - Select Edit, which directs you to the Edit Firestore Monitor page.
- Specify the threshold values for the required metrics, then click Save.
Firestore databases have no state in GCP. The monitor stays Up while the database exists, and it’s marked removed only when the database is deleted.
IT Automation
IT Automation tools automatically resolve performance degradation issues. These tools react to events proactively rather than waiting for manual intervention. The IT Automation tools automate repetitive tasks and automatically remediate threshold breaches. The alarm engine continually evaluates system events for which thresholds are set and executes the mapped automation when there is a breach.
Configuration Rules
Editing multiple monitors to associate different monitor groups or add a different tag can be a tedious process. With Configuration Rules, you can automate the configuration settings of your monitoring resources. Create custom rules to track configuration changes continuously and achieve the ideal configuration settings.
Summary
The Summary tab will give you the performance data organized by time for the metrics listed above. To view the summary:
- Go to Cloud > GCP > Firestore.
- Select a resource.
- Click the Summary tab.
Configuration Details
The Configuration Details tab provides details on the configurations of application instances. To get the configuration details:
- Go to Cloud > GCP > Firestore.
- Select a resource.
- Click the Configuration Details tab.
Reports
Gain in-depth data about the various parameters of your monitored resources and accentuate your service performance using our insightful reports.
To view reports for a Google Firestore resource:
- Go to the Reports section on the left navigation pane.
- Select Firestore from the menu on the left.
- You can find the Availability Summary Report, Performance Report, and Inventory Report for one selected monitor. Or you can get the Summary Report, Availability Summary Report, Health Trend Report, and Performance Report for all the Google Firestore monitors.
You can also get reports from the Summary tab of the Google Firestore monitor:
- Click the Summary tab.
- Get the Availability Summary Report of the monitor by clicking Availability.
- You can also find the Performance Report of the monitor by clicking any chart title.
