From 64e84a91b3dc658efac266f83a3b2396ca1bacd2 Mon Sep 17 00:00:00 2001 From: Mateusz Rzeszutek Date: Mon, 28 Mar 2022 13:48:46 +0200 Subject: [PATCH] code review comments --- .../semantic_conventions/database-metrics.md | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/specification/metrics/semantic_conventions/database-metrics.md b/specification/metrics/semantic_conventions/database-metrics.md index ce643fc4693..907efd1321b 100644 --- a/specification/metrics/semantic_conventions/database-metrics.md +++ b/specification/metrics/semantic_conventions/database-metrics.md @@ -25,34 +25,34 @@ and units. Below is a table of database client connection pool metric instruments that MUST be used by connection pool instrumentations: -| Name | Instrument | Unit | Unit ([UCUM](README.md#instrument-units)) | Description | -|------------------------|----------------------------|-------------|-------------------------------------------|-------------| -| `db.connections.usage` | Asynchronous UpDownCounter | connections | `{connections}` | The number of connections that are currently in state described by the `state` attribute. +| Name | Instrument | Unit | Unit ([UCUM](README.md#instrument-units)) | Description | +|-------------------------------|----------------------------|-------------|-------------------------------------------|-------------------------------------------------------------------------------------------| +| `db.client.connections.usage` | Asynchronous UpDownCounter | connections | `{connections}` | The number of connections that are currently in state described by the `state` attribute. | -All `db.connections.usage` measurements MUST include the following attribute: +All `db.client.connections.usage` measurements MUST include the following attribute: | Name | Type | Description | Examples | Required | |---------|--------|------------------------------------------------------------------------------|----------|----------| | `state` | string | The state of a connection in the pool. Valid values include: `idle`, `used`. | `idle` | Yes | -Instrumentation libraries for database server connection pools that collect data for the following data MUST use the +Instrumentation libraries for database client connection pools that collect data for the following data MUST use the following metric instruments. Otherwise, if the instrumentation library does not collect this data, these instruments MUST NOT be used. -| Name | Instrument | Unit | Unit ([UCUM](README.md#instrument-units)) | Description | -|-----------------------------------|----------------------------|--------------|-------------------------------------------|-------------| -| `db.connections.idle.max` | Asynchronous UpDownCounter | connections | `{connections}` | The maximum number of idle open connections allowed. -| `db.connections.idle.min` | Asynchronous UpDownCounter | connections | `{connections}` | The minimum number of idle open connections allowed. -| `db.connections.max` | Asynchronous UpDownCounter | connections | `{connections}` | The maximum number of open connections allowed. -| `db.connections.waiting_requests` | Asynchronous UpDownCounter | requests | `{requests}` | The number of pending requests for an open connection. -| `db.connections.timeouts` | Counter | timeouts | `{timeouts}` | The number of connection timeouts that have happened since the application start. -| `db.connections.time` | Histogram | milliseconds | `ms` | The time it took to apply an operation described by the `operation` attribute. +| Name | Instrument | Unit | Unit ([UCUM](README.md#instrument-units)) | Description | +|------------------------------------------|----------------------------|--------------|-------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------| +| `db.client.connections.idle.max` | Asynchronous UpDownCounter | connections | `{connections}` | The maximum number of idle open connections allowed. | +| `db.client.connections.idle.min` | Asynchronous UpDownCounter | connections | `{connections}` | The minimum number of idle open connections allowed. | +| `db.client.connections.max` | Asynchronous UpDownCounter | connections | `{connections}` | The maximum number of open connections allowed. | +| `db.client.connections.waiting_requests` | Asynchronous UpDownCounter | requests | `{requests}` | The number of pending requests for an open connection, cumulative for the entire pool. | +| `db.client.connections.timeouts` | Counter | timeouts | `{timeouts}` | The number of connection timeouts happened when trying to obtaing a connection from the pool that have happened since the application start. | +| `db.client.connections.time` | Histogram | milliseconds | `ms` | The time it took to apply an operation described by the `operation` attribute. | -All `db.connections.time` measurements MUST include the following attribute: +All `db.client.connections.time` measurements MUST include the following attribute: -| Name | Type | Description | Examples | Required | -|-------------|--------|-----------------------------------------------------------------------------------------------|----------|----------| -| `operation` | string | The type of operation applied to a connection. Valid values include: `create`, `use`, `wait`. | `create` | Yes | +| Name | Type | Description | Examples | Required | +|-------------|--------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|----------| +| `operation` | string | The type of operation applied to a connection. Valid values include: `create` (time it took to create a new connection), `use` (time spent using a connection obtained from the pool), `wait` (time spent waiting for an open connection). | `create` | Yes | Below is a table of the attributes that MUST be included on all connection pool measurements: