Prometheus 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 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
Name & Description | Type | Tags |
---|---|---|
planetscale_edge_active_connections The number of active MySQL connections to the branch | Gauge | cluster, planetscale_database_branch_id, planetscale_region |
planetscale_mysql_bytes_received_total Total number of bytes received from MySQL clients | Counter | cluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_mysql_bytes_sent_total Total number of bytes sent to MySQL clients | Counter | cluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_mysql_innodb_data_writes_total Total number of InnoDB data write operations | Counter | cluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_mysql_innodb_row_lock_time_total Total time spent acquiring row locks in InnoDB | Counter | cluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_mysql_innodb_row_lock_waits_total Number of times InnoDB had to wait for a row lock | Counter | cluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_mysql_innodb_row_operations_total Total number of row operations (inserts/updates/deletes) in InnoDB | Counter | cluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_mysql_operation_type, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_mysql_replica_lag_seconds Replica lag in fine-grained seconds from MySQL | Gauge | cluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_mysql_slow_queries_total Number of queries that exceeded the slow query threshold | Counter | cluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_mysql_threads_running Current number of threads executing in MySQL | Gauge | cluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_pods_cpu_util_percentages CPU utilization percentage of database pods | Gauge | cluster, planetscale_cell, planetscale_component, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_pods_iops_total Total IOPS (Input/Output Operations Per Second) of database pods | Counter | cluster, planetscale_cell, planetscale_component, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_pods_mem_util_percentages Memory utilization percentage of database pods | Gauge | cluster, planetscale_cell, planetscale_component, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_vtgate_affected_rows_total Number of rows affected by queries through vtgate | Counter | cluster, planetscale_cell, planetscale_database_branch_id, planetscale_pod |
planetscale_vtgate_commands_total Number of commands processed by vtgate | Counter | cluster, planetscale_cell, planetscale_command, planetscale_database_branch_id, planetscale_pod |
planetscale_vtgate_errors_total Total number of errors encountered by vtgate | Counter | cluster, planetscale_vtgate_code, planetscale_database_branch_id, planetscale_tablet_type, planetscale_keyspace, planetscale_cell, planetscale_pod, planetscale_vtgate_operation |
planetscale_vtgate_queries_duration Distribution of query execution times through vtgate | Histogram | cluster, le, planetscale_cell, planetscale_database_branch_id, planetscale_pod, planetscale_tablet_type, planetscale_vtgate_operation |
planetscale_vtgate_returned_rows_total Number of rows returned by queries through vtgate | Counter | cluster, planetscale_cell, planetscale_database_branch_id, planetscale_pod, planetscale_tablet_type |
planetscale_vtgate_total_pods Total number of vtgate pods | Gauge | cluster, planetscale_cell, planetscale_database_branch_id |
planetscale_vtorc_failed_recoveries_total Number of failed replication/recovery attempts by vtorc | Counter | cluster, planetscale_database_branch_id, planetscale_pod, planetscale_vtorc_recovery_type |
planetscale_vtorc_successful_recoveries_total Number of successful replication/recovery attempts by vtorc | Counter | cluster, planetscale_database_branch_id, planetscale_pod, planetscale_vtorc_recovery_type |
planetscale_vttablet_connection_pool_active Number of active connections in the vttablet connection pool | Gauge | cluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_vttablet_connection_pool_capacity Total capacity of the vttablet connection pool | Gauge | cluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_vttablet_connection_pool_get_total Number of connection get operations from the vttablet pool | Counter | cluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_vttablet_connection_pool_in_use Number of connections currently in use in the vttablet pool | Gauge | cluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_vttablet_connection_pool_wait_time_total Total time spent waiting for connections from the vttablet pool | Counter | cluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_vttablet_connection_pool_wait_total Number of waits for an available connection in the vttablet pool | Counter | cluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_vttablet_errors_total Number of errors encountered by vttablet | Counter | cluster, planetscale_cell, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type, planetscale_vttablet_code |
planetscale_vttablet_found_rows_pool_active Number of active connections in the vttablet found rows pool | Gauge | cluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_vttablet_found_rows_pool_capacity Total capacity of the vttablet found rows pool | Gauge | cluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_vttablet_found_rows_pool_get_total Number of connection get operations from the found rows pool | Counter | cluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_vttablet_found_rows_pool_in_use Number of connections currently in use in the found rows pool | Gauge | cluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_vttablet_found_rows_pool_wait_time_total Total time spent waiting for connections from the found rows pool | Counter | cluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_vttablet_found_rows_pool_wait_total Number of waits for an available connection in the found rows pool | Counter | cluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_vttablet_queries_affected_rows_total Total number of rows affected by queries through vttablet | Counter | cluster, planetscale_command, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_table, planetscale_tablet_type |
planetscale_vttablet_queries_duration Distribution of query execution times through vttablet | Histogram | cluster, le, planetscale_command, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_vttablet_queries_duration_by_table_total Total of query execution times through vttablet, broken down by table | Counter | cluster, planetscale_command, planetscale_database_branch_id, planetscale_keyspace, planetscale_shard, planetscale_table, planetscale_tablet_type |
planetscale_vttablet_queries_read_rows_total Total number of rows read by queries through vttablet | Counter | cluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_vttablet_queries_returned_rows_total Total number of rows returned by queries through vttablet | Counter | cluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_table, planetscale_tablet_type |
planetscale_vttablet_queries_total Total number of queries processed by vttablet | Counter | cluster, planetscale_command, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_table, planetscale_tablet_type |
planetscale_vttablet_replication_lag MySQL replication lag in seconds | Gauge | cluster, planetscale_cell, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_vttablet_stream_connection_pool_active Number of active connections in the vttablet stream connection pool | Gauge | cluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_vttablet_stream_connection_pool_capacity Total capacity of the vttablet stream connection pool | Gauge | cluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_vttablet_stream_connection_pool_get_total Number of connection get operations from the stream connection pool | Counter | cluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_vttablet_stream_connection_pool_in_use Number of connections currently in use in the stream connection pool | Gauge | cluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_vttablet_stream_connection_pool_wait_time_total Total time spent waiting for connections from the stream pool | Counter | cluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_vttablet_stream_connection_pool_wait_total Number of waits for an available connection in the stream pool | Counter | cluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_vttablet_table_storage_bytes Storage size of tables in bytes | Gauge | cluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_shard, planetscale_table |
planetscale_vttablet_transaction_pool_active Number of active transactions in the vttablet transaction pool | Gauge | cluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_vttablet_transaction_pool_capacity Total capacity of the vttablet transaction pool | Gauge | cluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_vttablet_transaction_pool_get_total Number of transaction get operations from the transaction pool | Counter | cluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_vttablet_transaction_pool_in_use Number of transactions currently in use in the transaction pool | Gauge | cluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_vttablet_transaction_pool_wait_time_total Total time spent waiting for transactions from the transaction pool | Counter | cluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_vttablet_transaction_pool_wait_total Number of waits for an available transaction in the transaction pool | Counter | cluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_vttablet_volume_available_bytes Available storage space in bytes on vttablet volumes | Gauge | cluster, planetscale_cell, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_vttablet_volume_capacity_bytes Total storage capacity in bytes on vttablet volumes | Gauge | cluster, planetscale_cell, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type |
planetscale_workflow_vreplication_lag VReplication lag in seconds for workflow operations | Gauge | cluster, planetscale_cell, planetscale_database_branch_id, planetscale_keyspace, planetscale_shard, planetscale_source_keyspace, planetscale_source_shard, planetscale_workflow |
planetscale_workflow_vreplication_stream_state State of the VReplication stream for workflow operations | Gauge | cluster, planetscale_cell, planetscale_database_branch_id, planetscale_keyspace, planetscale_shard, planetscale_state, planetscale_workflow |
Edge Metrics (Single Tenant & Managed only)
Name & Description | Type | Tags |
---|---|---|
planetscale_edge_cpu_util_percentages CPU utilization percentage of Edge instances | Gauge | cluster, planetscale_component, planetscale_instance |
planetscale_edge_instance_connections Number of active connections to Edge instances | Gauge | cluster, planetscale_component, planetscale_instance, planetscale_region |
planetscale_edge_mem_util_percentages Memory utilization percentage of Edge instances | Gauge | cluster, planetscale_component, planetscale_instance |
planetscale_edge_queries_total Total number of queries processed by Edge instances | Counter | cluster, planetscale_component, planetscale_instance, planetscale_region |
planetscale_psdb_api_cpu_util_percentages CPU utilization percentage of PSDB API instances | Gauge | cluster, planetscale_availability_zone, planetscale_component, planetscale_pod |
planetscale_psdb_api_mem_util_percentages Memory utilization percentage of PSDB API instances | Gauge | cluster, planetscale_availability_zone, planetscale_component, planetscale_pod |
planetscale_psdb_api_requests_total Total number of requests processed by PSDB API instances | Counter | cluster, planetscale_availability_zone, planetscale_component, planetscale_pod, planetscale_psdb_api_operation |
Tag Glossary
Tag Name | Description |
---|---|
cluster | The database cluster identifier |
le | Histogram bucket upper bound (less than or equal to) |
planetscale_availability_zone | AWS availability zone where the component is running |
planetscale_cell | Availability zone or cell where the component is running |
planetscale_command | VTGate command type (e.g., Select, Insert, Update) |
planetscale_component | Vitess component type (vtgate, vttablet, vtctld, vtorc) |
planetscale_database_branch_id | Unique identifier for the database branch |
planetscale_instance | Edge instance identifier |
planetscale_keyspace | Database keyspace (logical database name) |
planetscale_mysql_operation_type | MySQL row operation type (inserted, read, updated, deleted) |
planetscale_pod | Kubernetes pod name where the component is running |
planetscale_psdb_api_operation | PSDB API operation type |
planetscale_region | Geographic region where the database is hosted |
planetscale_shard | Database shard identifier |
planetscale_source_keyspace | Source keyspace for VReplication workflow operations |
planetscale_source_shard | Source shard for VReplication workflow operations |
planetscale_state | VReplication stream state (e.g., Running, Stopped) |
planetscale_table | Database table name |
planetscale_tablet_type | Vitess tablet type (primary, replica, rdonly) |
planetscale_vtgate_operation | VTGate operation type (Execute, ExecuteBatch, etc.) |
planetscale_vtgate_code | VTGate error code (INVALID_ARGUMENT, etc.) |
planetscale_vttablet_code | VTTablet error code (NOT_FOUND, etc.) |
planetscale_vtorc_recovery_type | Type of recovery operation performed by VTOrc (planned, unplanned) |
planetscale_workflow | VReplication workflow identifier |
Need help?
Get help from the PlanetScale Support team, or join our GitHub discussion board to see how others are using PlanetScale.