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 name | Metric type | Description |
---|---|---|
planetscale_edge_active_connections | gauge | The number of active MySQL connections to the branch |
planetscale_mysql_bytes_received_total | counter | Total number of bytes received from MySQL clients |
planetscale_mysql_bytes_sent_total | counter | Total number of bytes sent to MySQL clients |
planetscale_mysql_innodb_data_writes_total | counter | Total number of InnoDB data write operations |
planetscale_mysql_innodb_row_lock_time_total | counter | Total time spent acquiring row locks in InnoDB |
planetscale_mysql_innodb_row_lock_waits_total | counter | Number of times InnoDB had to wait for a row lock |
planetscale_mysql_innodb_row_operations_total | counter | Total number of row operations (inserts/updates/deletes) in InnoDB |
planetscale_mysql_replica_lag_seconds | gauge | Replica lag in fine-grained seconds from MySQL |
planetscale_mysql_slow_queries_total | counter | Number of queries that exceeded the slow query threshold |
planetscale_mysql_threads_running | gauge | Current number of threads executing in MySQL |
planetscale_pods_cpu_util_percentages | gauge | CPU utilization percentage of database pods |
planetscale_pods_iops_total | counter | Total IOPS (Input/Output Operations Per Second) of database pods |
planetscale_pods_mem_util_percentages | gauge | Memory utilization percentage of database pods |
planetscale_vtgate_affected_rows_total | counter | Number of rows affected by queries through vtgate |
planetscale_vtgate_commands_total | counter | Number of commands processed by vtgate |
planetscale_vtgate_errors_total | counter | Total number of errors encountered by vtgate |
planetscale_vtgate_queries_duration | histogram | Distribution of query execution times through vtgate |
planetscale_vtgate_returned_rows_total | counter | Number of rows returned by queries through vtgate |
planetscale_vtgate_total_pods | gauge | Total number of vtgate pods |
planetscale_vtorc_failed_recoveries_total | counter | Number of failed replication/recovery attempts by vtorc |
planetscale_vtorc_successful_recoveries_total | counter | Number of successful replication/recovery attempts by vtorc |
planetscale_vttablet_connection_pool_active | gauge | Number of active connections in the vttablet connection pool |
planetscale_vttablet_connection_pool_capacity | gauge | Total capacity of the vttablet connection pool |
planetscale_vttablet_connection_pool_get_total | counter | Number of connection get operations from the vttablet pool |
planetscale_vttablet_connection_pool_in_use | gauge | Number of connections currently in use in the vttablet pool |
planetscale_vttablet_connection_pool_wait_time_total | counter | Total time spent waiting for connections from the vttablet pool |
planetscale_vttablet_connection_pool_wait_total | counter | Number of waits for an available connection in the vttablet pool |
planetscale_vttablet_errors_total | counter | Number of errors encountered by vttablet |
planetscale_vttablet_found_rows_pool_active | gauge | Number of active connections in the vttablet found rows pool |
planetscale_vttablet_found_rows_pool_capacity | gauge | Total capacity of the vttablet found rows pool |
planetscale_vttablet_found_rows_pool_get_total | counter | Number of connection get operations from the found rows pool |
planetscale_vttablet_found_rows_pool_in_use | gauge | Number of connections currently in use in the found rows pool |
planetscale_vttablet_found_rows_pool_wait_time_total | counter | Total time spent waiting for connections from the found rows pool |
planetscale_vttablet_found_rows_pool_wait_total | counter | Number of waits for an available connection in the found rows pool |
planetscale_vttablet_queries_affected_rows_total | counter | Total number of rows affected by queries through vttablet |
planetscale_vttablet_queries_duration | histogram | Distribution of query execution times through vttablet |
planetscale_vttablet_queries_duration_by_table_total | counter | Total of query execution times through vttablet, broken down by table |
planetscale_vttablet_queries_read_rows_total | counter | Total number of rows read by queries through vttablet |
planetscale_vttablet_queries_returned_rows_total | counter | Total number of rows returned by queries through vttablet |
planetscale_vttablet_queries_total | counter | Total number of queries processed by vttablet |
planetscale_vttablet_replication_lag | gauge | MySQL replication lag in seconds |
planetscale_vttablet_stream_connection_pool_active | gauge | Number of active connections in the vttablet stream connection pool |
planetscale_vttablet_stream_connection_pool_capacity | gauge | Total capacity of the vttablet stream connection pool |
planetscale_vttablet_stream_connection_pool_get_total | counter | Number of connection get operations from the stream connection pool |
planetscale_vttablet_stream_connection_pool_in_use | gauge | Number of connections currently in use in the stream connection pool |
planetscale_vttablet_stream_connection_pool_wait_time_total | counter | Total time spent waiting for connections from the stream pool |
planetscale_vttablet_stream_connection_pool_wait_total | counter | Number of waits for an available connection in the stream pool |
planetscale_vttablet_table_storage_bytes | gauge | Storage size of tables in bytes |
planetscale_vttablet_transaction_pool_active | gauge | Number of active transactions in the vttablet transaction pool |
planetscale_vttablet_transaction_pool_capacity | gauge | Total capacity of the vttablet transaction pool |
planetscale_vttablet_transaction_pool_get_total | counter | Number of transaction get operations from the transaction pool |
planetscale_vttablet_transaction_pool_in_use | gauge | Number of transactions currently in use in the transaction pool |
planetscale_vttablet_transaction_pool_wait_time_total | counter | Total time spent waiting for transactions from the transaction pool |
planetscale_vttablet_transaction_pool_wait_total | counter | Number of waits for an available transaction in the transaction pool |
planetscale_vttablet_volume_available_bytes | gauge | Available storage space in bytes on vttablet volumes |
planetscale_vttablet_volume_capacity_bytes | gauge | Total storage capacity in bytes on vttablet volumes |
planetscale_workflow_vreplication_lag | gauge | VReplication lag in seconds for workflow operations |
planetscale_workflow_vreplication_stream_state | gauge | State of the VReplication stream for workflow operations |
Edge Metrics (Single Tenant & Managed only)
Metric name | Metric type | Description |
---|---|---|
planetscale_edge_cpu_util_percentages | gauge | CPU utilization percentage of Edge instances |
planetscale_edge_instance_connections | gauge | Number of active connections to Edge instances |
planetscale_edge_mem_util_percentages | gauge | Memory utilization percentage of Edge instances |
planetscale_edge_queries_total | counter | Total number of queries processed by Edge instances |
planetscale_psdb_api_cpu_util_percentages | gauge | CPU utilization percentage of PSDB API instances |
planetscale_psdb_api_mem_util_percentages | gauge | Memory utilization percentage of PSDB API instances |
planetscale_psdb_api_requests_total | counter | Total 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.