diff --git a/docs/semconv/database.md b/docs/semconv/database.md index 6274dbd..31041e4 100644 --- a/docs/semconv/database.md +++ b/docs/semconv/database.md @@ -40,6 +40,10 @@ This page tries to describe a semantic convention for the attributes and metrics - [Metric `db.overflow.lock.count`](#metric-dboverflowlockcount) - [Metric `db.overflow.transaction.count`](#metric-dboverflowtransactioncount) - [Metric `db.overflow.user.count`](#metric-dboverflowusercount) + - [Metric `db.lock.waits`](#metric-dblockwaits) + - [Metric `db.cache.read.ratio`](#metric-dbcachereadratio) + - [Metric `db.cache.write.ratio`](#metric-dbcachewriteratio) + - [Metric `db.lru.writes`](#metric-dblruwrites) - [Resource Usage Metrics](#resource-usage-metrics) - [Metric `db.disk.usage`](#metric-dbdiskusage) - [Metric `db.disk.utilization`](#metric-dbdiskutilization) @@ -261,6 +265,39 @@ This metric is [optional](https://github.com/open-telemetry/semantic-conventions |--------------------------|-----------------|------------------|----------------------------------------------------------------------------------------------| | `db.overflow.user.count` | UpDownCounter | `{overflowUser}` | Number of times a User thread attempted to acquire a lock when no locks were available. | +### Metric: `db.lock.waits` +This metric is [optional](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/general/metric-requirement-level.md#opt-in). + +| Name | Instrument Type | Units (UCUM) | Description | +|-------------------|-----------------|---------------|-------------------------------------| +| `db.lock.waits` | UpDownCounter | `{lockWaits}` | Number of threads waiting for lock. | + +### Metric: `db.cache.read.ratio` +This metric is [optional](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/general/metric-requirement-level.md#opt-in). + +| Name | Instrument Type | Units (UCUM) | Description | +|-----------------------|-----------------|--------------|------------------------------------------------------------------------------------------| +| `db.cache.read.ratio` | Gauge | `1` | Percentage of page reads for this buffer pool that were satisfied by a cached page image | + + +### Metric: `db.cache.write.ratio` +This metric is [optional](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/general/metric-requirement-level.md#opt-in). + +| Name | Instrument Type | Units (UCUM) | Description | +|------------------------|-----------------|--------------|-------------------------------------------------------------------------------------------| +| `db.cache.write.ratio` | Gauge | `1` | Percentage of page Writes for this buffer pool that were satisfied by a cached page image | + +### Metric: `db.lru.writes` +This metric is [optional](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/general/metric-requirement-level.md#opt-in). + +| Name | Instrument Type | Units (UCUM) | Description | +|-----------------|-----------------|---------------|----------------------------------------| +| `db.lru.writes` | UpDownCounter | `{lruWrites}` | Number of Least Recently Used Writes. | + +### Notes: + +- The database server performs LRU (Least Recently Used) writes as background writes that typically occur when the percentage of dirty buffers (pages that are not accessed) exceeds the percent that is specified for lru_max_dirty in the BUFFERPOOL configuration parameter. + ## Resource Usage Metrics ### Metric: `db.disk.usage` This metric is [recommended](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/general/metric-requirement-level.md#recommended).