Appearance
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
| Name | Type | Freq | Labels | Description |
|---|---|---|---|---|
yb_database_locks | gauge | 1m | database_oid, mode | Number of locks held by database with oid 'database_oid', per lock mode |