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

Name & DescriptionTypeTags
planetscale_edge_active_connections The number of active MySQL connections to the branchGaugecluster, planetscale_database_branch_id, planetscale_region
planetscale_mysql_bytes_received_total Total number of bytes received from MySQL clientsCountercluster, 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 clientsCountercluster, 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 operationsCountercluster, 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 InnoDBCountercluster, 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 lockCountercluster, 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 InnoDBCountercluster, 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 MySQLGaugecluster, 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 thresholdCountercluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type
planetscale_mysql_threads_running Current number of threads executing in MySQLGaugecluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type
planetscale_pods_cpu_util_percentages CPU utilization percentage of database podsGaugecluster, 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 podsCountercluster, 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 podsGaugecluster, 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 vtgateCountercluster, planetscale_cell, planetscale_database_branch_id, planetscale_pod
planetscale_vtgate_commands_total Number of commands processed by vtgateCountercluster, planetscale_cell, planetscale_command, planetscale_database_branch_id, planetscale_pod
planetscale_vtgate_errors_total Total number of errors encountered by vtgateCountercluster, 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 vtgateHistogramcluster, 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 vtgateCountercluster, planetscale_cell, planetscale_database_branch_id, planetscale_pod, planetscale_tablet_type
planetscale_vtgate_total_pods Total number of vtgate podsGaugecluster, planetscale_cell, planetscale_database_branch_id
planetscale_vtorc_failed_recoveries_total Number of failed replication/recovery attempts by vtorcCountercluster, planetscale_database_branch_id, planetscale_pod, planetscale_vtorc_recovery_type
planetscale_vtorc_successful_recoveries_total Number of successful replication/recovery attempts by vtorcCountercluster, planetscale_database_branch_id, planetscale_pod, planetscale_vtorc_recovery_type
planetscale_vttablet_connection_pool_active Number of active connections in the vttablet connection poolGaugecluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type
planetscale_vttablet_connection_pool_capacity Total capacity of the vttablet connection poolGaugecluster, 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 poolCountercluster, 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 poolGaugecluster, 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 poolCountercluster, 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 poolCountercluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type
planetscale_vttablet_errors_total Number of errors encountered by vttabletCountercluster, 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 poolGaugecluster, 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 poolGaugecluster, 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 poolCountercluster, 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 poolGaugecluster, 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 poolCountercluster, 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 poolCountercluster, 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 vttabletCountercluster, 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 vttabletHistogramcluster, 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 tableCountercluster, 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 vttabletCountercluster, 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 vttabletCountercluster, 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 vttabletCountercluster, 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 secondsGaugecluster, 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 poolGaugecluster, 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 poolGaugecluster, 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 poolCountercluster, 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 poolGaugecluster, 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 poolCountercluster, 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 poolCountercluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type
planetscale_vttablet_table_storage_bytes Storage size of tables in bytesGaugecluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_shard, planetscale_table
planetscale_vttablet_transaction_pool_active Number of active transactions in the vttablet transaction poolGaugecluster, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type
planetscale_vttablet_transaction_pool_capacity Total capacity of the vttablet transaction poolGaugecluster, 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 poolCountercluster, 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 poolGaugecluster, 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 poolCountercluster, 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 poolCountercluster, 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 volumesGaugecluster, 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 volumesGaugecluster, planetscale_cell, planetscale_database_branch_id, planetscale_keyspace, planetscale_pod, planetscale_shard, planetscale_tablet_type
planetscale_vttablet_vstreamer_errors_total Total number of vttablet vstreamer errors.Countercluster, planetscale_cell, planetscale_database_branch_id, planetscale_keyspace, planetscale_shard, planetscale_vstreamer_code
planetscale_vttablet_vstreamer_events_total Total number of vttablet vstreamer streamed events.Countercluster, planetscale_cell, planetscale_database_branch_id, planetscale_keyspace, planetscale_shard
planetscale_workflow_vreplication_lag VReplication lag in seconds for workflow operationsGaugecluster, 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 operationsGaugecluster, planetscale_cell, planetscale_database_branch_id, planetscale_keyspace, planetscale_shard, planetscale_state, planetscale_workflow

Edge metrics (Single Tenant & Managed only)

Name & DescriptionTypeTags
planetscale_edge_cpu_util_percentages CPU utilization percentage of Edge instancesGaugecluster, planetscale_component, planetscale_instance
planetscale_edge_instance_connections Number of active connections to Edge instancesGaugecluster, planetscale_component, planetscale_instance, planetscale_region
planetscale_edge_mem_util_percentages Memory utilization percentage of Edge instancesGaugecluster, planetscale_component, planetscale_instance
planetscale_edge_queries_total Total number of queries processed by Edge instancesCountercluster, planetscale_component, planetscale_instance, planetscale_region
planetscale_psdb_api_cpu_util_percentages CPU utilization percentage of PSDB API instancesGaugecluster, planetscale_availability_zone, planetscale_component, planetscale_pod
planetscale_psdb_api_mem_util_percentages Memory utilization percentage of PSDB API instancesGaugecluster, planetscale_availability_zone, planetscale_component, planetscale_pod
planetscale_psdb_api_requests_total Total number of requests processed by PSDB API instancesCountercluster, planetscale_availability_zone, planetscale_component, planetscale_pod, planetscale_psdb_api_operation

Tag glossary

Tag NameDescription
clusterThe database cluster identifier
leHistogram bucket upper bound (less than or equal to)
planetscale_availability_zoneAWS availability zone where the component is running
planetscale_cellAvailability zone or cell where the component is running
planetscale_commandVTGate command type (e.g., Select, Insert, Update)
planetscale_componentVitess component type (vtgate, vttablet, vtctld, vtorc)
planetscale_database_branch_idUnique identifier for the database branch
planetscale_instanceEdge instance identifier
planetscale_keyspaceDatabase keyspace (logical database name)
planetscale_mysql_operation_typeMySQL row operation type (inserted, read, updated, deleted)
planetscale_podKubernetes pod name where the component is running
planetscale_psdb_api_operationPSDB API operation type
planetscale_regionGeographic region where the database is hosted
planetscale_shardDatabase shard identifier
planetscale_source_keyspaceSource keyspace for VReplication workflow operations
planetscale_source_shardSource shard for VReplication workflow operations
planetscale_stateVReplication stream state (e.g., Running, Stopped)
planetscale_tableDatabase table name
planetscale_tablet_typeVitess tablet type (primary, replica, rdonly)
planetscale_vtgate_operationVTGate operation type (Execute, ExecuteBatch, etc.)
planetscale_vtgate_codeVTGate error code (INVALID_ARGUMENT, etc.)
planetscale_vttablet_codeVTTablet error code (NOT_FOUND, etc.)
planetscale_vstreamer_codeVTTablet VStreamer error code (StreamEnded, etc.)
planetscale_vtorc_recovery_typeType of recovery operation performed by VTOrc (planned, unplanned)
planetscale_workflowVReplication workflow identifier

Need help?

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