565 lines
33 KiB
Markdown
565 lines
33 KiB
Markdown
<!--- Hugo front matter used to generate the website version of this page:
|
|
linkTitle: Metrics
|
|
--->
|
|
|
|
# Semantic Conventions for Database Metrics
|
|
|
|
**Status**: [Experimental][DocumentStatus]
|
|
|
|
The conventions described in this section are specific to SQL and NoSQL clients.
|
|
|
|
**Disclaimer:** These are initial database client metric instruments
|
|
and attributes but more may be added in the future.
|
|
|
|
<!-- Re-generate TOC with `markdown-toc --no-first-h1 -i` -->
|
|
|
|
<!-- toc -->
|
|
|
|
- [Database operation](#database-operation)
|
|
- [Metric: `db.client.operation.duration`](#metric-dbclientoperationduration)
|
|
- [Connection pools](#connection-pools)
|
|
- [Metric: `db.client.connection.count`](#metric-dbclientconnectioncount)
|
|
- [Metric: `db.client.connection.idle.max`](#metric-dbclientconnectionidlemax)
|
|
- [Metric: `db.client.connection.idle.min`](#metric-dbclientconnectionidlemin)
|
|
- [Metric: `db.client.connection.max`](#metric-dbclientconnectionmax)
|
|
- [Metric: `db.client.connection.pending_requests`](#metric-dbclientconnectionpending_requests)
|
|
- [Metric: `db.client.connection.timeouts`](#metric-dbclientconnectiontimeouts)
|
|
- [Metric: `db.client.connection.create_time`](#metric-dbclientconnectioncreate_time)
|
|
- [Metric: `db.client.connection.wait_time`](#metric-dbclientconnectionwait_time)
|
|
- [Metric: `db.client.connection.use_time`](#metric-dbclientconnectionuse_time)
|
|
|
|
<!-- tocstop -->
|
|
|
|
> **Warning**
|
|
>
|
|
> Existing database instrumentations that are using
|
|
> [v1.24.0 of this document](https://github.com/open-telemetry/semantic-conventions/blob/v1.24.0/docs/database/database-spans.md)
|
|
> (or prior):
|
|
>
|
|
> * SHOULD NOT change the version of the database conventions that they emit
|
|
> until the database semantic conventions are marked stable.
|
|
> Conventions include, but are not limited to, attributes,
|
|
> metric and span names, and unit of measure.
|
|
> * SHOULD introduce an environment variable `OTEL_SEMCONV_STABILITY_OPT_IN`
|
|
> in the existing major version which is a comma-separated list of values.
|
|
> If the list of values includes:
|
|
> * `database` - emit the new, stable database conventions,
|
|
> and stop emitting the old experimental database conventions
|
|
> that the instrumentation emitted previously.
|
|
> * `database/dup` - emit both the old and the stable database conventions,
|
|
> allowing for a seamless transition.
|
|
> * The default behavior (in the absence of one of these values) is to continue
|
|
> emitting whatever version of the old experimental database conventions
|
|
> the instrumentation was emitting previously.
|
|
> * Note: `database/dup` has higher precedence than `database` in case both values are present
|
|
> * SHOULD maintain (security patching at a minimum) the existing major version
|
|
> for at least six months after it starts emitting both sets of conventions.
|
|
> * SHOULD drop the environment variable in the next major version.
|
|
|
|
## Database operation
|
|
|
|
### Metric: `db.client.operation.duration`
|
|
|
|
**Status**: [Experimental][DocumentStatus]
|
|
|
|
This metric is [required][MetricRequired].
|
|
|
|
When this metric is reported alongside a database operation span, the metric value SHOULD be the same as the database operation span duration.
|
|
|
|
This metric SHOULD be specified with
|
|
[`ExplicitBucketBoundaries`](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.33.0/specification/metrics/api.md#instrument-advisory-parameters)
|
|
of `[ 0.001, 0.005, 0.01, 0.05, 0.1, 0.5, 1, 5, 10 ]`.
|
|
|
|
<!-- semconv metric.db.client.operation.duration(metric_table) -->
|
|
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
|
|
<!-- see templates/registry/markdown/snippet.md.j2 -->
|
|
<!-- prettier-ignore-start -->
|
|
<!-- markdownlint-capture -->
|
|
<!-- markdownlint-disable -->
|
|
|
|
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
|
|
| -------- | --------------- | ----------- | -------------- | --------- |
|
|
| `db.client.operation.duration` | Histogram | `s` | Duration of database client operations. |  |
|
|
|
|
|
|
<!-- markdownlint-restore -->
|
|
<!-- prettier-ignore-end -->
|
|
<!-- END AUTOGENERATED TEXT -->
|
|
<!-- endsemconv -->
|
|
|
|
<!-- semconv metric.db.client.operation.duration(full) -->
|
|
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
|
|
<!-- see templates/registry/markdown/snippet.md.j2 -->
|
|
<!-- prettier-ignore-start -->
|
|
<!-- markdownlint-capture -->
|
|
<!-- markdownlint-disable -->
|
|
|
|
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|
|
|---|---|---|---|---|---|
|
|
| [`db.system`](/docs/attributes-registry/db.md) | string | The database management system (DBMS) product as identified by the client instrumentation. [1] | `other_sql`; `adabas`; `cache` | `Required` |  |
|
|
| [`db.collection.name`](/docs/attributes-registry/db.md) | string | The name of a collection (table, container) within the database. [2] | `public.users`; `customers` | `Conditionally Required` [3] |  |
|
|
| [`db.namespace`](/docs/attributes-registry/db.md) | string | The name of the database, fully qualified within the server address and port. [4] | `customers`; `test.users` | `Conditionally Required` If available. |  |
|
|
| [`db.operation.name`](/docs/attributes-registry/db.md) | string | The name of the operation or command being executed. [5] | `findAndModify`; `HMSET`; `SELECT` | `Conditionally Required` [6] |  |
|
|
| [`error.type`](/docs/attributes-registry/error.md) | string | Describes a class of error the operation ended with. [7] | `timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500` | `Conditionally Required` If and only if the operation failed. |  |
|
|
| [`server.port`](/docs/attributes-registry/server.md) | int | Server port number. [8] | `80`; `8080`; `443` | `Conditionally Required` [9] |  |
|
|
| [`network.peer.address`](/docs/attributes-registry/network.md) | string | Peer address of the database node where the operation was performed. [10] | `10.1.2.80`; `/tmp/my.sock` | `Recommended` If applicable for this database system. |  |
|
|
| [`network.peer.port`](/docs/attributes-registry/network.md) | int | Peer port number of the network connection. | `65123` | `Recommended` If and only if `network.peer.address` is set. |  |
|
|
| [`server.address`](/docs/attributes-registry/server.md) | string | Name of the database host. [11] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | `Recommended` |  |
|
|
|
|
**[1]:** The actual DBMS may differ from the one identified by the client. For example, when using PostgreSQL client libraries to connect to a CockroachDB, the `db.system` is set to `postgresql` based on the instrumentation's best knowledge.
|
|
|
|
**[2]:** If the collection name is parsed from the query, it SHOULD match the value provided in the query and may be qualified with the schema and database name.
|
|
It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization.
|
|
|
|
**[3]:** If readily available. Otherwise, if the instrumentation library parses `db.query.text` to capture `db.collection.name`, then it SHOULD be the first collection name found in the query.
|
|
|
|
**[4]:** If a database system has multiple namespace components, they SHOULD be concatenated (potentially using database system specific conventions) from most general to most specific namespace component, and more specific namespaces SHOULD NOT be captured without the more general namespaces, to ensure that "startswith" queries for the more general namespaces will be valid.
|
|
Semantic conventions for individual database systems SHOULD document what `db.namespace` means in the context of that system.
|
|
It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization.
|
|
|
|
**[5]:** It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization.
|
|
|
|
**[6]:** If readily available. Otherwise, if the instrumentation library parses `db.query.text` to capture `db.operation.name`, then it SHOULD be the first operation name found in the query.
|
|
|
|
**[7]:** The `error.type` SHOULD match the error code returned by the database or the client library, the canonical name of exception that occurred, or another low-cardinality error identifier. Instrumentations SHOULD document the list of errors they report.
|
|
|
|
**[8]:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.
|
|
|
|
**[9]:** If using a port other than the default port for this DBMS and if `server.address` is set.
|
|
|
|
**[10]:** Semantic conventions for individual database systems SHOULD document whether `network.peer.*` attributes are applicable. Network peer address and port are useful when the application interacts with individual database nodes directly.
|
|
If a database operation involved multiple network calls (for example retries), the address of the last contacted node SHOULD be used.
|
|
|
|
**[11]:** When observed from the client side, and when communicating through an intermediary, `server.address` SHOULD represent the server address behind any intermediaries, for example proxies, if it's available.
|
|
|
|
|
|
|
|
`db.system` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
|
|
|
|
| Value | Description | Stability |
|
|
|---|---|---|
|
|
| `other_sql` | Some other SQL database. Fallback only. See notes. |  |
|
|
| `adabas` | Adabas (Adaptable Database System) |  |
|
|
| `cache` | InterSystems Caché |  |
|
|
| `cassandra` | Apache Cassandra |  |
|
|
| `clickhouse` | ClickHouse |  |
|
|
| `cloudscape` | Cloudscape |  |
|
|
| `cockroachdb` | CockroachDB |  |
|
|
| `coldfusion` | ColdFusion IMQ |  |
|
|
| `cosmosdb` | Microsoft Azure Cosmos DB |  |
|
|
| `couchbase` | Couchbase |  |
|
|
| `couchdb` | CouchDB |  |
|
|
| `db2` | IBM Db2 |  |
|
|
| `derby` | Apache Derby |  |
|
|
| `dynamodb` | Amazon DynamoDB |  |
|
|
| `edb` | EnterpriseDB |  |
|
|
| `elasticsearch` | Elasticsearch |  |
|
|
| `filemaker` | FileMaker |  |
|
|
| `firebird` | Firebird |  |
|
|
| `firstsql` | FirstSQL |  |
|
|
| `geode` | Apache Geode |  |
|
|
| `h2` | H2 |  |
|
|
| `hanadb` | SAP HANA |  |
|
|
| `hbase` | Apache HBase |  |
|
|
| `hive` | Apache Hive |  |
|
|
| `hsqldb` | HyperSQL DataBase |  |
|
|
| `informix` | Informix |  |
|
|
| `ingres` | Ingres |  |
|
|
| `instantdb` | InstantDB |  |
|
|
| `interbase` | InterBase |  |
|
|
| `mariadb` | MariaDB |  |
|
|
| `maxdb` | SAP MaxDB |  |
|
|
| `memcached` | Memcached |  |
|
|
| `mongodb` | MongoDB |  |
|
|
| `mssql` | Microsoft SQL Server |  |
|
|
| `mssqlcompact` | Microsoft SQL Server Compact |  |
|
|
| `mysql` | MySQL |  |
|
|
| `neo4j` | Neo4j |  |
|
|
| `netezza` | Netezza |  |
|
|
| `opensearch` | OpenSearch |  |
|
|
| `oracle` | Oracle Database |  |
|
|
| `pervasive` | Pervasive PSQL |  |
|
|
| `pointbase` | PointBase |  |
|
|
| `postgresql` | PostgreSQL |  |
|
|
| `progress` | Progress Database |  |
|
|
| `redis` | Redis |  |
|
|
| `redshift` | Amazon Redshift |  |
|
|
| `spanner` | Cloud Spanner |  |
|
|
| `sqlite` | SQLite |  |
|
|
| `sybase` | Sybase |  |
|
|
| `teradata` | Teradata |  |
|
|
| `trino` | Trino |  |
|
|
| `vertica` | Vertica |  |
|
|
|
|
|
|
`error.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
|
|
|
|
| Value | Description | Stability |
|
|
|---|---|---|
|
|
| `_OTHER` | A fallback error value to be used when the instrumentation doesn't define a custom value. |  |
|
|
|
|
|
|
|
|
<!-- markdownlint-restore -->
|
|
<!-- prettier-ignore-end -->
|
|
<!-- END AUTOGENERATED TEXT -->
|
|
<!-- endsemconv -->
|
|
|
|
## Connection pools
|
|
|
|
The following metric instruments describe database client connection pool operations.
|
|
|
|
### Metric: `db.client.connection.count`
|
|
|
|
This metric is [required][MetricRequired].
|
|
|
|
<!-- semconv metric.db.client.connection.count(metric_table) -->
|
|
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
|
|
<!-- see templates/registry/markdown/snippet.md.j2 -->
|
|
<!-- prettier-ignore-start -->
|
|
<!-- markdownlint-capture -->
|
|
<!-- markdownlint-disable -->
|
|
|
|
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
|
|
| -------- | --------------- | ----------- | -------------- | --------- |
|
|
| `db.client.connection.count` | UpDownCounter | `{connection}` | The number of connections that are currently in state described by the `state` attribute |  |
|
|
|
|
|
|
<!-- markdownlint-restore -->
|
|
<!-- prettier-ignore-end -->
|
|
<!-- END AUTOGENERATED TEXT -->
|
|
<!-- endsemconv -->
|
|
|
|
<!-- semconv metric.db.client.connection.count(full) -->
|
|
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
|
|
<!-- see templates/registry/markdown/snippet.md.j2 -->
|
|
<!-- prettier-ignore-start -->
|
|
<!-- markdownlint-capture -->
|
|
<!-- markdownlint-disable -->
|
|
|
|
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|
|
|---|---|---|---|---|---|
|
|
| [`db.client.connections.pool.name`](/docs/attributes-registry/db.md) | string | The name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, instrumentation should use a combination of `server.address` and `server.port` attributes formatted as `server.address:server.port`. | `myDataSource` | `Required` |  |
|
|
| [`db.client.connections.state`](/docs/attributes-registry/db.md) | string | The state of a connection in the pool | `idle` | `Required` |  |
|
|
|
|
`db.client.connections.state` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
|
|
|
|
| Value | Description | Stability |
|
|
|---|---|---|
|
|
| `idle` | idle |  |
|
|
| `used` | used |  |
|
|
|
|
|
|
|
|
<!-- markdownlint-restore -->
|
|
<!-- prettier-ignore-end -->
|
|
<!-- END AUTOGENERATED TEXT -->
|
|
<!-- endsemconv -->
|
|
### Metric: `db.client.connection.idle.max`
|
|
|
|
This metric is [recommended][MetricRecommended].
|
|
|
|
<!-- semconv metric.db.client.connection.idle.max(metric_table) -->
|
|
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
|
|
<!-- see templates/registry/markdown/snippet.md.j2 -->
|
|
<!-- prettier-ignore-start -->
|
|
<!-- markdownlint-capture -->
|
|
<!-- markdownlint-disable -->
|
|
|
|
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
|
|
| -------- | --------------- | ----------- | -------------- | --------- |
|
|
| `db.client.connection.idle.max` | UpDownCounter | `{connection}` | The maximum number of idle open connections allowed |  |
|
|
|
|
|
|
<!-- markdownlint-restore -->
|
|
<!-- prettier-ignore-end -->
|
|
<!-- END AUTOGENERATED TEXT -->
|
|
<!-- endsemconv -->
|
|
|
|
<!-- semconv metric.db.client.connection.idle.max(full) -->
|
|
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
|
|
<!-- see templates/registry/markdown/snippet.md.j2 -->
|
|
<!-- prettier-ignore-start -->
|
|
<!-- markdownlint-capture -->
|
|
<!-- markdownlint-disable -->
|
|
|
|
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|
|
|---|---|---|---|---|---|
|
|
| [`db.client.connections.pool.name`](/docs/attributes-registry/db.md) | string | The name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, instrumentation should use a combination of `server.address` and `server.port` attributes formatted as `server.address:server.port`. | `myDataSource` | `Required` |  |
|
|
|
|
|
|
<!-- markdownlint-restore -->
|
|
<!-- prettier-ignore-end -->
|
|
<!-- END AUTOGENERATED TEXT -->
|
|
<!-- endsemconv -->
|
|
|
|
### Metric: `db.client.connection.idle.min`
|
|
|
|
This metric is [recommended][MetricRecommended].
|
|
|
|
<!-- semconv metric.db.client.connection.idle.min(metric_table) -->
|
|
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
|
|
<!-- see templates/registry/markdown/snippet.md.j2 -->
|
|
<!-- prettier-ignore-start -->
|
|
<!-- markdownlint-capture -->
|
|
<!-- markdownlint-disable -->
|
|
|
|
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
|
|
| -------- | --------------- | ----------- | -------------- | --------- |
|
|
| `db.client.connection.idle.min` | UpDownCounter | `{connection}` | The minimum number of idle open connections allowed |  |
|
|
|
|
|
|
<!-- markdownlint-restore -->
|
|
<!-- prettier-ignore-end -->
|
|
<!-- END AUTOGENERATED TEXT -->
|
|
<!-- endsemconv -->
|
|
|
|
<!-- semconv metric.db.client.connection.idle.min(full) -->
|
|
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
|
|
<!-- see templates/registry/markdown/snippet.md.j2 -->
|
|
<!-- prettier-ignore-start -->
|
|
<!-- markdownlint-capture -->
|
|
<!-- markdownlint-disable -->
|
|
|
|
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|
|
|---|---|---|---|---|---|
|
|
| [`db.client.connections.pool.name`](/docs/attributes-registry/db.md) | string | The name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, instrumentation should use a combination of `server.address` and `server.port` attributes formatted as `server.address:server.port`. | `myDataSource` | `Required` |  |
|
|
|
|
|
|
<!-- markdownlint-restore -->
|
|
<!-- prettier-ignore-end -->
|
|
<!-- END AUTOGENERATED TEXT -->
|
|
<!-- endsemconv -->
|
|
|
|
### Metric: `db.client.connection.max`
|
|
|
|
This metric is [recommended][MetricRecommended].
|
|
|
|
<!-- semconv metric.db.client.connection.max(metric_table) -->
|
|
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
|
|
<!-- see templates/registry/markdown/snippet.md.j2 -->
|
|
<!-- prettier-ignore-start -->
|
|
<!-- markdownlint-capture -->
|
|
<!-- markdownlint-disable -->
|
|
|
|
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
|
|
| -------- | --------------- | ----------- | -------------- | --------- |
|
|
| `db.client.connection.max` | UpDownCounter | `{connection}` | The maximum number of open connections allowed |  |
|
|
|
|
|
|
<!-- markdownlint-restore -->
|
|
<!-- prettier-ignore-end -->
|
|
<!-- END AUTOGENERATED TEXT -->
|
|
<!-- endsemconv -->
|
|
|
|
<!-- semconv metric.db.client.connection.max(full) -->
|
|
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
|
|
<!-- see templates/registry/markdown/snippet.md.j2 -->
|
|
<!-- prettier-ignore-start -->
|
|
<!-- markdownlint-capture -->
|
|
<!-- markdownlint-disable -->
|
|
|
|
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|
|
|---|---|---|---|---|---|
|
|
| [`db.client.connections.pool.name`](/docs/attributes-registry/db.md) | string | The name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, instrumentation should use a combination of `server.address` and `server.port` attributes formatted as `server.address:server.port`. | `myDataSource` | `Required` |  |
|
|
|
|
|
|
<!-- markdownlint-restore -->
|
|
<!-- prettier-ignore-end -->
|
|
<!-- END AUTOGENERATED TEXT -->
|
|
<!-- endsemconv -->
|
|
|
|
### Metric: `db.client.connection.pending_requests`
|
|
|
|
This metric is [recommended][MetricRecommended].
|
|
|
|
<!-- semconv metric.db.client.connection.pending_requests(metric_table) -->
|
|
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
|
|
<!-- see templates/registry/markdown/snippet.md.j2 -->
|
|
<!-- prettier-ignore-start -->
|
|
<!-- markdownlint-capture -->
|
|
<!-- markdownlint-disable -->
|
|
|
|
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
|
|
| -------- | --------------- | ----------- | -------------- | --------- |
|
|
| `db.client.connection.pending_requests` | UpDownCounter | `{request}` | The number of pending requests for an open connection, cumulative for the entire pool |  |
|
|
|
|
|
|
<!-- markdownlint-restore -->
|
|
<!-- prettier-ignore-end -->
|
|
<!-- END AUTOGENERATED TEXT -->
|
|
<!-- endsemconv -->
|
|
|
|
<!-- semconv metric.db.client.connection.pending_requests(full) -->
|
|
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
|
|
<!-- see templates/registry/markdown/snippet.md.j2 -->
|
|
<!-- prettier-ignore-start -->
|
|
<!-- markdownlint-capture -->
|
|
<!-- markdownlint-disable -->
|
|
|
|
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|
|
|---|---|---|---|---|---|
|
|
| [`db.client.connections.pool.name`](/docs/attributes-registry/db.md) | string | The name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, instrumentation should use a combination of `server.address` and `server.port` attributes formatted as `server.address:server.port`. | `myDataSource` | `Required` |  |
|
|
|
|
|
|
<!-- markdownlint-restore -->
|
|
<!-- prettier-ignore-end -->
|
|
<!-- END AUTOGENERATED TEXT -->
|
|
<!-- endsemconv -->
|
|
|
|
### Metric: `db.client.connection.timeouts`
|
|
|
|
This metric is [recommended][MetricRecommended].
|
|
|
|
<!-- semconv metric.db.client.connection.timeouts(metric_table) -->
|
|
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
|
|
<!-- see templates/registry/markdown/snippet.md.j2 -->
|
|
<!-- prettier-ignore-start -->
|
|
<!-- markdownlint-capture -->
|
|
<!-- markdownlint-disable -->
|
|
|
|
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
|
|
| -------- | --------------- | ----------- | -------------- | --------- |
|
|
| `db.client.connection.timeouts` | Counter | `{timeout}` | The number of connection timeouts that have occurred trying to obtain a connection from the pool |  |
|
|
|
|
|
|
<!-- markdownlint-restore -->
|
|
<!-- prettier-ignore-end -->
|
|
<!-- END AUTOGENERATED TEXT -->
|
|
<!-- endsemconv -->
|
|
|
|
<!-- semconv metric.db.client.connection.timeouts(full) -->
|
|
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
|
|
<!-- see templates/registry/markdown/snippet.md.j2 -->
|
|
<!-- prettier-ignore-start -->
|
|
<!-- markdownlint-capture -->
|
|
<!-- markdownlint-disable -->
|
|
|
|
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|
|
|---|---|---|---|---|---|
|
|
| [`db.client.connections.pool.name`](/docs/attributes-registry/db.md) | string | The name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, instrumentation should use a combination of `server.address` and `server.port` attributes formatted as `server.address:server.port`. | `myDataSource` | `Required` |  |
|
|
|
|
|
|
<!-- markdownlint-restore -->
|
|
<!-- prettier-ignore-end -->
|
|
<!-- END AUTOGENERATED TEXT -->
|
|
<!-- endsemconv -->
|
|
|
|
### Metric: `db.client.connection.create_time`
|
|
|
|
This metric is [recommended][MetricRecommended].
|
|
|
|
<!-- semconv metric.db.client.connection.create_time(metric_table) -->
|
|
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
|
|
<!-- see templates/registry/markdown/snippet.md.j2 -->
|
|
<!-- prettier-ignore-start -->
|
|
<!-- markdownlint-capture -->
|
|
<!-- markdownlint-disable -->
|
|
|
|
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
|
|
| -------- | --------------- | ----------- | -------------- | --------- |
|
|
| `db.client.connection.create_time` | Histogram | `s` | The time it took to create a new connection |  |
|
|
|
|
|
|
<!-- markdownlint-restore -->
|
|
<!-- prettier-ignore-end -->
|
|
<!-- END AUTOGENERATED TEXT -->
|
|
<!-- endsemconv -->
|
|
|
|
<!-- semconv metric.db.client.connection.create_time(full) -->
|
|
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
|
|
<!-- see templates/registry/markdown/snippet.md.j2 -->
|
|
<!-- prettier-ignore-start -->
|
|
<!-- markdownlint-capture -->
|
|
<!-- markdownlint-disable -->
|
|
|
|
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|
|
|---|---|---|---|---|---|
|
|
| [`db.client.connections.pool.name`](/docs/attributes-registry/db.md) | string | The name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, instrumentation should use a combination of `server.address` and `server.port` attributes formatted as `server.address:server.port`. | `myDataSource` | `Required` |  |
|
|
|
|
|
|
<!-- markdownlint-restore -->
|
|
<!-- prettier-ignore-end -->
|
|
<!-- END AUTOGENERATED TEXT -->
|
|
<!-- endsemconv -->
|
|
|
|
### Metric: `db.client.connection.wait_time`
|
|
|
|
This metric is [recommended][MetricRecommended].
|
|
|
|
<!-- semconv metric.db.client.connection.wait_time(metric_table) -->
|
|
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
|
|
<!-- see templates/registry/markdown/snippet.md.j2 -->
|
|
<!-- prettier-ignore-start -->
|
|
<!-- markdownlint-capture -->
|
|
<!-- markdownlint-disable -->
|
|
|
|
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
|
|
| -------- | --------------- | ----------- | -------------- | --------- |
|
|
| `db.client.connection.wait_time` | Histogram | `s` | The time it took to obtain an open connection from the pool |  |
|
|
|
|
|
|
<!-- markdownlint-restore -->
|
|
<!-- prettier-ignore-end -->
|
|
<!-- END AUTOGENERATED TEXT -->
|
|
<!-- endsemconv -->
|
|
|
|
<!-- semconv metric.db.client.connection.wait_time(full) -->
|
|
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
|
|
<!-- see templates/registry/markdown/snippet.md.j2 -->
|
|
<!-- prettier-ignore-start -->
|
|
<!-- markdownlint-capture -->
|
|
<!-- markdownlint-disable -->
|
|
|
|
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|
|
|---|---|---|---|---|---|
|
|
| [`db.client.connections.pool.name`](/docs/attributes-registry/db.md) | string | The name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, instrumentation should use a combination of `server.address` and `server.port` attributes formatted as `server.address:server.port`. | `myDataSource` | `Required` |  |
|
|
|
|
|
|
<!-- markdownlint-restore -->
|
|
<!-- prettier-ignore-end -->
|
|
<!-- END AUTOGENERATED TEXT -->
|
|
<!-- endsemconv -->
|
|
|
|
### Metric: `db.client.connection.use_time`
|
|
|
|
This metric is [recommended][MetricRecommended].
|
|
|
|
<!-- semconv metric.db.client.connection.use_time(metric_table) -->
|
|
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
|
|
<!-- see templates/registry/markdown/snippet.md.j2 -->
|
|
<!-- prettier-ignore-start -->
|
|
<!-- markdownlint-capture -->
|
|
<!-- markdownlint-disable -->
|
|
|
|
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
|
|
| -------- | --------------- | ----------- | -------------- | --------- |
|
|
| `db.client.connection.use_time` | Histogram | `s` | The time between borrowing a connection and returning it to the pool |  |
|
|
|
|
|
|
<!-- markdownlint-restore -->
|
|
<!-- prettier-ignore-end -->
|
|
<!-- END AUTOGENERATED TEXT -->
|
|
<!-- endsemconv -->
|
|
|
|
<!-- semconv metric.db.client.connection.use_time(full) -->
|
|
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
|
|
<!-- see templates/registry/markdown/snippet.md.j2 -->
|
|
<!-- prettier-ignore-start -->
|
|
<!-- markdownlint-capture -->
|
|
<!-- markdownlint-disable -->
|
|
|
|
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|
|
|---|---|---|---|---|---|
|
|
| [`db.client.connections.pool.name`](/docs/attributes-registry/db.md) | string | The name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, instrumentation should use a combination of `server.address` and `server.port` attributes formatted as `server.address:server.port`. | `myDataSource` | `Required` |  |
|
|
|
|
|
|
<!-- markdownlint-restore -->
|
|
<!-- prettier-ignore-end -->
|
|
<!-- END AUTOGENERATED TEXT -->
|
|
<!-- endsemconv -->
|
|
|
|
[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.33.0/specification/document-status.md
|
|
[MetricRequired]: /docs/general/metric-requirement-level.md#required
|
|
[MetricRecommended]: /docs/general/metric-requirement-level.md#recommended
|