Skip to content

Monitoring guide

Google Cloud monitoring for applications

Google Cloud publishes metrics for every managed service in Cloud Monitoring. Bring the important ones next to your application traces and outside checks.

3 min read11 sectionsUpdated

On this page

Key points

  • Cloud Run: request latencies, 5xx counts, instance count, container CPU and memory.
  • Cloud SQL: CPU, memory, connections, disk and replication lag.
  • Load balancer: backend latency and 5xx.
  • Pull metric types with a Monitoring Viewer service account.

Metric types worth pulling

ServiceMetric typeWorry when
Cloud Runrun.googleapis.com/request_latencies, run.googleapis.com/request_count (by response_code_class)Latency or 5xx rising
Cloud Runrun.googleapis.com/container/instance_countAt the max instances limit
Compute Enginecompute.googleapis.com/instance/cpu/utilizationSustained high
Cloud SQLcloudsql.googleapis.com/database/cpu/utilization, …/disk/utilizationNear 100%
Load balancingloadbalancing.googleapis.com/https/backend_latenciesRising

Google Cloud monitoring with VitalRix

The Google Cloud Monitoring integration pulls time series (timeSeries.list) for up to 10 metric types you choose, including prefixes such as compute.googleapis.com/instance/cpu/*, into VitalRix every few minutes, using a service account JSON key with the Monitoring Viewer role (stored encrypted). Chart them on dashboards, alert on them, and pair them with OpenTelemetry traces for APM and uptime checks from outside Google Cloud. GKE clusters are covered in Kubernetes monitoring. Setup: Google Cloud integration.

Service account

bash
gcloud iam service-accounts create vitalrix-metrics --display-name "VitalRix metrics reader"
gcloud projects add-iam-policy-binding my-project \
  --member "serviceAccount:vitalrix-metrics@my-project.iam.gserviceaccount.com" \
  --role roles/monitoring.viewer
gcloud iam service-accounts keys create key.json \
  --iam-account vitalrix-metrics@my-project.iam.gserviceaccount.com

Cloud Run in practice

Cloud Run scales instances with traffic and can scale to zero, so the first request after a quiet period pays a cold start. Watch request latency percentiles alongside instance count: p99 spikes when instances jump from zero mean cold starts, which a minimum instance count removes for latency-sensitive services. Concurrency per instance also matters: too high and requests compete for CPU; too low and you pay for more instances. Trace the service with OpenTelemetry to see whether time goes to your code or to dependencies such as Cloud SQL.

Alerts to start with

  • Cloud Run 5xx share above 1% for 5 minutes.
  • Request latency p95 above target for 10 minutes.
  • Instance count at the configured maximum (requests will queue).
  • Cloud SQL CPU above 80% or disk above 85%.
  • An uptime check on the public URL from outside Google Cloud.

GKE clusters

Monitor GKE workloads like any Kubernetes cluster: pod resources against limits, restarts, pending pods and node pressure, with traces from your services; see Kubernetes monitoring.

Frequently asked questions

Is there a cost to reading Cloud Monitoring metrics?

Google Cloud may charge for monitoring API read calls beyond free allowances. Limit metric types and check current pricing.

How do I monitor Cloud Run cold starts?

Watch request latency percentiles together with instance count; configure minimum instances for latency-sensitive services.

Check it now, free

  • Multi-cloud monitoring: Monitor workloads across AWS, Azure and Google Cloud in one place: provider metrics, OpenTelemetry for your apps, consistent tags.
  • Grafana vs Datadog: Grafana vs Datadog compared: the open-source Grafana stack and Grafana Cloud against Datadog for dashboards, metrics, logs, traces, alerting and cost.
  • A Grafana Cloud alternative: VitalRix vs Grafana Cloud: VitalRix vs Grafana Cloud: building blocks you assemble versus a ready-made monitoring product, compared on dashboards, traces, logs and incidents.
  • Hybrid cloud monitoring: Monitor hybrid environments: services across data centres and public clouds, consistent tagging, OpenTelemetry everywhere, network paths between sites.
  • Monitoring a cloud migration: Monitor a cloud migration safely: baseline performance before you move, compare old and new side by side, watch the cutover.
  • How to monitor Firebase: How to monitor a Firebase app: Hosting uptime, Cloud Functions errors and latency, Firestore reads and costs, Authentication, Crashlytics and alerting.

Watch your own site and services with VitalRix

Uptime checks, APM, logs, real-user monitoring, alerts and status pages in one place. Every product has a free tier and no credit card is needed.