New Relic integrations with the Google Cloud Platform (GCP) include one that reports Google Cloud Spanner data to New Relic. This document explains how to activate the GCP Cloud Spanner integration and describes the data it reports.
Features
Google Cloud Spanner is a globally distributed relational database service built for the cloud. New Relic Spanner integration collects node, CPU, storage, session, API request, and query metrics for each Spanner instance and the databases hosted on it.
Activate integration
To enable the integration, follow standard procedures to connect your GCP service to New Relic:
Polling frequency
New Relic integrations query your GCP services according to a polling interval that varies by integration. The polling frequency for Google Cloud Spanner is 5 minutes. The resolution is 1 data point every minute.
Important
Cloud Spanner supports 1-minute polling intervals for WIF integrations in limited preview. To request access, contact New Relic support.
Workload Identity Federation
Find and use data
After you enable the integration, your Spanner resources appear as entities in the New Relic entity explorer. To see dashboards and manage services, go to one.newrelic.com > All capabilities > Infrastructure > GCP.
All Spanner 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 Spanner metrics documentation for the complete list.
Entities
Metric data
Key metrics
Metric name | Unit | Description |
|---|---|---|
| Count | Number of nodes provisioned for the Spanner instance. |
| Count | Number of processing units provisioned for the Spanner instance. |
| Percent | Fraction of provisioned CPU currently in use, expressed between 0 and 1. |
| Percent | Twenty-four-hour smoothed CPU utilization of the Spanner instance. |
| Percent | CPU utilization at the Spanner instance, faceted by priority. |
| Bytes | Storage currently in use by the Spanner instance. |
| Bytes | Storage limit for the Spanner instance. |
| Percent | Storage in use at the Spanner instance, as a fraction of the limit. |
| Count | Number of sessions in use on the Spanner instance. |
| Bytes | Backup storage in use by the Spanner instance. |
| Percent | High-priority CPU utilization target used by the autoscaler. |
| Percent | Storage utilization target used by the autoscaler. |
| Percent | Share of Spanner leaders for the instance, faceted by region. |
| Count/s | Number of Spanner API requests, faceted by |
| Seconds | Server request latency distribution, faceted by |
| Bytes | Uncompressed request bytes received by Spanner, faceted by |
| Bytes | Uncompressed response bytes sent by Spanner, faceted by |
| Count | Number of queries executed, faceted by |
| Seconds | Distribution of total query execution time within the database. |
| Seconds | CPU-seconds spent by Spanner executing queries against the database. |
| Count | Number of rows returned by queries against the database. |
| Count | Number of rows scanned by queries against the database, excluding deleted values. |
| Seconds | Total lock-wait time recorded for the database from lock conflicts. |
| Count | Number of commit attempts for transactions on the database. |
| Seconds | Distribution of total transaction time from first operation to commit or abort. |
| Count | Number of rows deleted by row-deletion policies since the last sample. |
For the complete list of Spanner metrics, see Google's Spanner metrics documentation.
Service account or user account
Find and use data
After activating the integration and waiting a few minutes (based on the polling frequency), data will appear in the New Relic UI. To find and use your data, including links to your and alert settings, go to one.newrelic.com > All capabilities > Infrastructure > GCP > (select an integration).
To view metric data for your GCP Spanner integration in New Relic, create NRQL queries for GcpSpannerInstanceSample and GcpSpannerDatabaseSample events and their related attributes.
GcpSpannerInstanceSample
Query GcpSpannerInstanceSample events in New Relic to view data for the following attributes:
Attribute | Description |
|---|---|
| High priority CPU utilization target used for autoscaling. |
| Maximum number of nodes autoscaler is allowed to allocate to the instance. |
| Maximum number of processing units autoscaler is allowed to allocate to the instance. |
| Minimum number of nodes autoscaler is allowed to allocate to the instance. |
| Minimum number of processing units autoscaler is allowed to allocate to the instance. |
| Storage utilization target used for autoscaling. |
| Backup storage used in bytes. |
| Twenty-four hour smoothed utilization of provisioned CPU. Values are typically numbers between 0.0 and 1.0 (but might exceed 1.0), charts display the values as a percentage between 0% and 100% (or more). |
| Percent utilization of provisioned CPU. Values are typically numbers between 0.0 and 1.0 (but might exceed 1.0), charts display the values as a percentage between 0% and 100% (or more). |
| Percent utilization of provisioned CPU, by operation type. Values are typically numbers between 0.0 and 1.0 (but might exceed 1.0), charts display the values as a percentage between 0% and 100% (or more). Currently, it does not include CPU utilization for system tasks. |
| Percent utilization of provisioned CPU, by priority. Values are typically numbers between 0.0 and 1.0 (but might exceed 1.0), charts display the values as a percentage between 0% and 100% (or more). |
| Total processing units used for DataBoost operations. |
| Percentage of leaders by cloud region. Values are typically numbers between 0.0 and 1.0, charts display the values as a percentage between 0% and 100%. |
| Total number of nodes. |
| Total number of processing units. |
| Number of sessions in use. |
| Storage limit for instance in bytes. |
| Storage limit per processing unit in bytes. |
| Storage used in bytes. |
| Storage used as a fraction of storage limit. |
GcpSpannerDatabaseSample
Query GcpSpannerDatabaseSample events in New Relic to view data for the following attributes:
Attribute | Description |
|---|---|
| Cloud Spanner API requests. |
| Uncompressed request bytes received by Cloud Spanner. |
| Rate of Cloud Spanner API requests. |
| Distribution of server request latencies for a database. This includes latency of request processing in Cloud Spanner backends and API layer. It does not include network or reverse-proxy overhead between clients and servers. |
| Distribution of server request latencies for a database. This includes latency of request processing in Cloud Spanner backends and API layer. It does not include network or reverse-proxy overhead between clients and servers. |
| Uncompressed response bytes sent by Cloud Spanner. |
| Total lock wait time for lock conflicts recorded for the entire database. |
| Count of queries by database name, status, query type, and used optimizer version. |
| Number of data bytes that the queries returned, excluding transmission encoding overhead. |
| Number of seconds of CPU time Cloud Spanner spent on operations to execute the queries. |
| Number of times Cloud Spanner saw queries during the interval. |
| Number of times queries failed during the interval. |
| Distribution of total length of time, in seconds, for query executions within the database. |
| Count of remote service calls. |
| Latency of remote service calls. |
| Network bytes exchanged with remote service. |
| Count of rows processed by a remote service. |
| Latency of rows processed by a remote service. |
| Number of rows that the queries returned. |
| Number of rows that the queries scanned excluding deleted values. |
| Total number of data bytes that the reads returned excluding transmission encoding overhead. |
| Number of seconds spent waiting due to throttling. |
| Number of seconds of CPU time Cloud Spanner spent execute the reads excluding prefetch CPU and other overhead. |
| Number of times Cloud Spanner executed the read shapesduring the interval. |
| Number of seconds spent coordinating reads across instances in multi-regionconfigurations. |
| Distribution of total time in seconds spent waiting due to locking. |
| Number of rows that the reads returned. |
| Count of rows deleted by the policy since the last sample. |
| Time between now and the read timestamp of the last successful execution. An execution happens as the background task deletes eligible data in batches and is successful even when there are rows that cannot be deleted. |
| Number of rows in all tables in the database that can't be deleted. A row can't be deleted if, for example, it has so many child rows that a delete would exceed the transaction limit. |
| Number of bytes written by transactions. |
| Number of commit attempts for transactions. |
| Number of commit attempts that are retries from previously aborted transaction attempts. |
| Distribution of total number of participants in each commit attempt. |
| Distribution of total seconds takenfrom the first operation of the transaction to commit or abort. |