Skip to main content

Overview

See our Prometheus integration documentation for how to set Prometheus up to automatically discover and scrape metrics for your database branches. If you’re using Datadog, see our Datadog tutorial for how to setup your Datadog agent to scrape metrics for your branch.

Metrics

PlanetScale emits the following metrics to be scraped.

Database metrics

The planetscale_keyspace and planetscale_shard tags on planetscale_vtorc_failed_recoveries_total and planetscale_vtorc_successful_recoveries_total are only present on databases running Vitess 23 or later. On earlier versions these counters are reported per pod and recovery type only, and queries that group by keyspace or shard return nothing.

Edge metrics (Single Tenant & Managed only)

Deprecated metrics

These metrics are deprecated and will be removed eventually.

Experimental metrics

These metrics are experimental and may be subject to changes to their name, type, or tags.

Attributing container restarts

planetscale_pods_container_status_restarts_total counts every restart and carries no role or reason label. Join the metric that carries the one you want. To break restarts down by role, join planetscale_pods_status_phase:
To break restarts down by reason as well, filter against planetscale_pods_container_last_terminated_reason one minute at a time and join the role onto the result:
The gauge only reports a container’s latest termination reason, so the query attributes each minute’s restarts to the reason current in that minute, then sums over the hour. Change 1h to your own window and leave the 1m alone. A container that restarts twice inside one minute under two different reasons has both restarts attributed to the later one.

Tag glossary

Need help?

Get help from the PlanetScale Support team, or join our Discord community to see how others are using PlanetScale.