Skip to content

Locks Metrics ​

This page documents Prometheus metrics related to database-level locking in Yellowbrick. These metrics provide insight into lock contention and concurrency patterns within transactional workloads.

Purpose ​

The lock metrics help monitor how many locks are currently held across databases, and what types of locks (e.g., shared, exclusive) are in use. This is useful for:

  • Detecting lock contention or long-running transactions
  • Analyzing workload concurrency
  • Debugging DDL/DML blocking behavior
  • Enabling better tuning decisions around transaction isolation and access patterns

Lock metrics are especially important for scenarios where concurrent modifications may introduce contention.

Metrics ​

NameTypeFreqLabelsDescription
yb_database_locksgauge1mdatabase_oid, modeNumber of locks held by database with oid 'database_oid', per lock mode