Googlecloudspanner Receiver
contrib
Maintainers: @dashpole, @KiranmayiB, @nsj07
Source: opentelemetry-collector-contrib
Supported Telemetry
Overview
Google Cloud Spanner enable you to investigate issues with your database by exposing via Total and Top N built-in tables:- Query statistics
- Read statistics
- Transaction statistics
- Lock statistics
- and others
Getting Started
The following configuration example is:- googlecloudspanner - name of the Cloud Spanner Receiver related section in OpenTelemetry collector configuration file
- collection_interval - this receiver runs periodically. Each time it runs, it queries Google Cloud Spanner, creates metrics, and sends them to the next consumer (default: 1 minute). It is not recommended to change the default value of collection interval, since new values for metrics in the Spanner database appear only once a minute.
- initial_delay defines how long this receiver waits before starting.
- top_metrics_query_max_rows - max number of rows to fetch from Top N built-in table(100 by default)
- backfill_enabled - turn on/off 1-hour data backfill(by default it is turned off)
- cardinality_total_limit - limit of active series per 24 hours period. If specified, turns on cardinality filtering and handling. If zero or not specified, cardinality is not handled. You can read this document for more information about cardinality handling and filtering.
- hide_topn_lockstats_rowrangestartkey - if true, masks PII (key values) in row_range_start_key label for the โtop minute lock statsโ metric
- truncate_text - if true, the query text is truncated to 1024 characters.
- projects - list of GCP projects
- project_id - identifier of GCP project
- service_account_key - path to service account JSON key It is highly recommended to set this property to the correct value. In case it is empty, the Application Default Credentials will be used for the database connection.
- instances - list of Google Cloud Spanner instance for connection
- instance_id - identifier of Google Cloud Spanner instance
- databases - list of databases used from this instance
Configuration
Example Configuration
Last generated: 2026-04-13