Navigation

Metrics

Overview

PlanetScale exposes a Prometheus-compatible endpoint per-branch that allows you to scrape metrics for your database.

See our Prometheus integration documentation for how to set Prometheus up to automatically disover and scrape metrics for your database branches.

Metrics

PlanetScale emits the following metrics to be scraped.

Database Metrics

Metric nameMetric typeDescription
planetscale_edge_active_connectionsgaugeThe number of active MySQL connections to the branch
planetscale_mysql_bytes_received_totalcounterTotal number of bytes received from MySQL clients
planetscale_mysql_bytes_sent_totalcounterTotal number of bytes sent to MySQL clients
planetscale_mysql_innodb_data_writes_totalcounterTotal number of InnoDB data write operations
planetscale_mysql_innodb_row_lock_time_totalcounterTotal time spent acquiring row locks in InnoDB
planetscale_mysql_innodb_row_lock_waits_totalcounterNumber of times InnoDB had to wait for a row lock
planetscale_mysql_innodb_row_operations_totalcounterTotal number of row operations (inserts/updates/deletes) in InnoDB
planetscale_mysql_replica_lag_secondsgaugeReplica lag in fine-grained seconds from MySQL
planetscale_mysql_slow_queries_totalcounterNumber of queries that exceeded the slow query threshold
planetscale_mysql_threads_runninggaugeCurrent number of threads executing in MySQL
planetscale_pods_cpu_util_percentagesgaugeCPU utilization percentage of database pods
planetscale_pods_iops_totalcounterTotal IOPS (Input/Output Operations Per Second) of database pods
planetscale_pods_mem_util_percentagesgaugeMemory utilization percentage of database pods
planetscale_vtgate_affected_rows_totalcounterNumber of rows affected by queries through vtgate
planetscale_vtgate_commands_totalcounterNumber of commands processed by vtgate
planetscale_vtgate_errors_totalcounterTotal number of errors encountered by vtgate
planetscale_vtgate_queries_durationhistogramDistribution of query execution times through vtgate
planetscale_vtgate_returned_rows_totalcounterNumber of rows returned by queries through vtgate
planetscale_vtgate_total_podsgaugeTotal number of vtgate pods
planetscale_vtorc_failed_recoveries_totalcounterNumber of failed replication/recovery attempts by vtorc
planetscale_vtorc_successful_recoveries_totalcounterNumber of successful replication/recovery attempts by vtorc
planetscale_vttablet_connection_pool_activegaugeNumber of active connections in the vttablet connection pool
planetscale_vttablet_connection_pool_capacitygaugeTotal capacity of the vttablet connection pool
planetscale_vttablet_connection_pool_get_totalcounterNumber of connection get operations from the vttablet pool
planetscale_vttablet_connection_pool_in_usegaugeNumber of connections currently in use in the vttablet pool
planetscale_vttablet_connection_pool_wait_time_totalcounterTotal time spent waiting for connections from the vttablet pool
planetscale_vttablet_connection_pool_wait_totalcounterNumber of waits for an available connection in the vttablet pool
planetscale_vttablet_errors_totalcounterNumber of errors encountered by vttablet
planetscale_vttablet_found_rows_pool_activegaugeNumber of active connections in the vttablet found rows pool
planetscale_vttablet_found_rows_pool_capacitygaugeTotal capacity of the vttablet found rows pool
planetscale_vttablet_found_rows_pool_get_totalcounterNumber of connection get operations from the found rows pool
planetscale_vttablet_found_rows_pool_in_usegaugeNumber of connections currently in use in the found rows pool
planetscale_vttablet_found_rows_pool_wait_time_totalcounterTotal time spent waiting for connections from the found rows pool
planetscale_vttablet_found_rows_pool_wait_totalcounterNumber of waits for an available connection in the found rows pool
planetscale_vttablet_queries_affected_rows_totalcounterTotal number of rows affected by queries through vttablet
planetscale_vttablet_queries_durationhistogramDistribution of query execution times through vttablet
planetscale_vttablet_queries_duration_by_table_totalcounterTotal of query execution times through vttablet, broken down by table
planetscale_vttablet_queries_read_rows_totalcounterTotal number of rows read by queries through vttablet
planetscale_vttablet_queries_returned_rows_totalcounterTotal number of rows returned by queries through vttablet
planetscale_vttablet_queries_totalcounterTotal number of queries processed by vttablet
planetscale_vttablet_replication_laggaugeMySQL replication lag in seconds
planetscale_vttablet_stream_connection_pool_activegaugeNumber of active connections in the vttablet stream connection pool
planetscale_vttablet_stream_connection_pool_capacitygaugeTotal capacity of the vttablet stream connection pool
planetscale_vttablet_stream_connection_pool_get_totalcounterNumber of connection get operations from the stream connection pool
planetscale_vttablet_stream_connection_pool_in_usegaugeNumber of connections currently in use in the stream connection pool
planetscale_vttablet_stream_connection_pool_wait_time_totalcounterTotal time spent waiting for connections from the stream pool
planetscale_vttablet_stream_connection_pool_wait_totalcounterNumber of waits for an available connection in the stream pool
planetscale_vttablet_table_storage_bytesgaugeStorage size of tables in bytes
planetscale_vttablet_transaction_pool_activegaugeNumber of active transactions in the vttablet transaction pool
planetscale_vttablet_transaction_pool_capacitygaugeTotal capacity of the vttablet transaction pool
planetscale_vttablet_transaction_pool_get_totalcounterNumber of transaction get operations from the transaction pool
planetscale_vttablet_transaction_pool_in_usegaugeNumber of transactions currently in use in the transaction pool
planetscale_vttablet_transaction_pool_wait_time_totalcounterTotal time spent waiting for transactions from the transaction pool
planetscale_vttablet_transaction_pool_wait_totalcounterNumber of waits for an available transaction in the transaction pool
planetscale_vttablet_volume_available_bytesgaugeAvailable storage space in bytes on vttablet volumes
planetscale_vttablet_volume_capacity_bytesgaugeTotal storage capacity in bytes on vttablet volumes
planetscale_workflow_vreplication_laggaugeVReplication lag in seconds for workflow operations
planetscale_workflow_vreplication_stream_stategaugeState of the VReplication stream for workflow operations

Edge Metrics (Single Tenant & Managed only)

Metric nameMetric typeDescription
planetscale_edge_cpu_util_percentagesgaugeCPU utilization percentage of Edge instances
planetscale_edge_instance_connectionsgaugeNumber of active connections to Edge instances
planetscale_edge_mem_util_percentagesgaugeMemory utilization percentage of Edge instances
planetscale_edge_queries_totalcounterTotal number of queries processed by Edge instances
planetscale_psdb_api_cpu_util_percentagesgaugeCPU utilization percentage of PSDB API instances
planetscale_psdb_api_mem_util_percentagesgaugeMemory utilization percentage of PSDB API instances
planetscale_psdb_api_requests_totalcounterTotal number of requests processed by PSDB API instances

Need help?

Get help from the PlanetScale Support team, or join our GitHub discussion board to see how others are using PlanetScale.