Google Spanner Integration
Monitor transaction commit latency, read throughput, and node CPU metrics across your Cloud Spanner instances. Get AI-powered anomaly detection and hotspot identification for globally distributed databases.
How It Works
Connect via Google Cloud Monitoring API
TigerOps connects to Google Cloud Monitoring (formerly Stackdriver) using a GCP Service Account with the Monitoring Viewer role. All Spanner metrics are pulled from the spanner.googleapis.com metric namespace.
Configure Service Account Credentials
Create a GCP Service Account with monitoring.viewer and spanner.databaseReader roles. Export the JSON key or use Workload Identity for GKE deployments. TigerOps authenticates using these credentials to pull metrics.
Select Instances and Databases
Choose which Spanner instances and databases to monitor. TigerOps collects per-database metrics for commit latency, read latency, transaction throughput, and lock wait times with project and instance labels.
Set Latency and CPU Alerts
Define SLOs for commit latency p99, node CPU utilization thresholds, and lock conflict rates. TigerOps AI baselines Spanner throughput patterns and alerts on anomalous deviations before SLOs are breached.
What You Get Out of the Box
Transaction Commit Latency
p50, p95, and p99 commit latency per database and operation type. TigerOps tracks Spanner's commit_attempt_count vs commit_abort_count to detect transaction contention before it impacts throughput.
Read Throughput & Latency
Strong read and stale read latency histograms, rows read per second, bytes read per second, and query execution times. Identify which databases and time ranges drive the most read load.
Node CPU Utilization
Per-node CPU utilization with high-priority and low-priority task breakdown. TigerOps alerts when CPU exceeds your threshold and identifies whether the load is driven by reads, commits, or Spanner-internal compaction.
Lock & Contention Monitoring
Lock wait time distributions, transaction abort rates, and lock conflict counts. TigerOps surfaces hotspot rows and contended key ranges using Spanner lock statistics when available.
Storage Utilization Tracking
Per-database storage bytes used, storage limit proximity, and split-point distribution. TigerOps predicts when storage growth will approach instance limits and recommends capacity adjustments.
AI Throughput Anomaly Detection
TigerOps AI learns your Spanner read and commit throughput patterns across time-of-day and day-of-week dimensions. Anomalous drops or spikes trigger early alerts with correlated GCP infrastructure context.
TigerOps Config for Google Spanner
Connect TigerOps to Cloud Spanner via a GCP Service Account — no infrastructure changes needed.
# TigerOps Google Cloud Spanner integration config
# Place at /etc/tigerops/conf.d/spanner.yaml
integrations:
- name: google-spanner
type: google_cloud_spanner
config:
gcp:
project_id: my-gcp-project
# Service account credentials (or use Workload Identity on GKE)
credentials_file: /etc/tigerops/gcp-credentials.json
# Or use Workload Identity:
# use_workload_identity: true
# Spanner instances to monitor (empty = all instances in project)
instances:
- instance_id: production-spanner
databases:
- orders
- users
- inventory
- instance_id: analytics-spanner
databases:
- events
# Metrics to pull from Cloud Monitoring
cloud_monitoring_metrics:
- spanner.googleapis.com/instance/cpu/utilization
- spanner.googleapis.com/instance/storage/used_bytes
- spanner.googleapis.com/instance/node_count
- spanner.googleapis.com/api/request_count
- spanner.googleapis.com/api/request_latencies
- spanner.googleapis.com/lock_stat/total/lock_wait_seconds
# Query Insights (requires spanner.databaseReader role)
query_insights:
enabled: true
top_query_count: 20
poll_interval: 60s
remote_write:
endpoint: https://ingest.atatus.net/api/v1/write
bearer_token: "${TIGEROPS_API_KEY}"
alerts:
commitLatencyP99Ms: 50
nodeCpuHighPriorityPercent: 65
lockWaitSecondsPerMinute: 10Common Questions
Does TigerOps support all Google Cloud regions for Spanner?
Yes. TigerOps pulls metrics from Google Cloud Monitoring, which aggregates metrics across all Spanner regions. Multi-region Spanner instances are monitored with per-region latency breakdowns where Google exposes region-level metrics.
What GCP permissions does the TigerOps Service Account need?
The Service Account requires roles/monitoring.viewer for Cloud Monitoring metric access and roles/spanner.databaseReader if TigerOps queries Spanner directly for lock statistics and query insights. For GKE deployments, Workload Identity binding is supported instead of key files.
How does TigerOps integrate with Spanner Query Insights?
TigerOps can pull Spanner Query Insights data (top queries by CPU, latency, and scan count) via the Spanner API. These query-level metrics are correlated with your infrastructure metrics so you can trace latency spikes down to specific query shapes.
Can TigerOps detect Spanner hotspots?
Yes. TigerOps uses Spanner lock statistics and the Key Visualizer-compatible metrics where available to identify key ranges with high read or write contention. Hotspot detection alerts include the estimated throughput impact and suggested schema changes.
How are Spanner instance configuration changes tracked?
TigerOps monitors spanner.googleapis.com/instance/node_count and instance configuration via the Spanner API. When node count changes (scale up/down), TigerOps records the event as an annotation on metric charts so you can correlate performance changes with capacity events.
Get Proactive Visibility Into Cloud Spanner
Commit latency tracking, node CPU monitoring, and AI anomaly detection for Google Cloud Spanner. Connect in minutes.