From 8d2ab74d407a88d101335b7c55d11eb2a462c295 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Mon, 7 Oct 2024 11:50:59 -0700 Subject: [PATCH] Mark database semconv as release candidate (#1101) Co-authored-by: Liudmila Molkova --- .chloggen/1101.yaml | 22 ++++++ docs/attributes-registry/db.md | 120 ++++++++++++++++-------------- docs/database/README.md | 2 +- docs/database/cassandra.md | 6 ++ docs/database/cosmosdb.md | 3 + docs/database/couchdb.md | 1 + docs/database/database-metrics.md | 66 ++++++++-------- docs/database/database-spans.md | 17 +++-- docs/database/elasticsearch.md | 2 + docs/database/hbase.md | 3 + docs/database/mariadb.md | 5 +- docs/database/mongodb.md | 2 + docs/database/mssql.md | 5 +- docs/database/mysql.md | 5 +- docs/database/postgresql.md | 5 +- docs/database/redis.md | 3 + docs/database/sql.md | 5 +- model/database/metrics.yaml | 2 +- model/database/registry.yaml | 48 ++++++++---- 19 files changed, 207 insertions(+), 115 deletions(-) create mode 100644 .chloggen/1101.yaml diff --git a/.chloggen/1101.yaml b/.chloggen/1101.yaml new file mode 100644 index 0000000000..92cebe403a --- /dev/null +++ b/.chloggen/1101.yaml @@ -0,0 +1,22 @@ +# Use this changelog template to create an entry for release notes. +# +# If your change doesn't affect end users you should instead start +# your pull request title with [chore] or use the "Skip Changelog" label. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db) +component: db + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Mark database semantic conventions as release candidate + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +# The values here must be integers. +issues: [ 1101 ] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/docs/attributes-registry/db.md b/docs/attributes-registry/db.md index 4e525bc163..4a6505b2b0 100644 --- a/docs/attributes-registry/db.md +++ b/docs/attributes-registry/db.md @@ -33,28 +33,36 @@ This group defines the attributes used to describe telemetry in the context of d **[1]:** It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. If the collection name is parsed from the query text, it SHOULD be the first collection name found in the query and it SHOULD match the value provided in the query text including any schema and database name prefix. For batch operations, if the individual operations are known to have the same collection name then that collection name SHOULD be used, otherwise `db.collection.name` SHOULD NOT be captured. +This attribute has stability level RELEASE CANDIDATE. **[2]:** 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. +This attribute has stability level RELEASE CANDIDATE. **[3]:** Operations are only considered batches when they contain two or more operations, and so `db.operation.batch.size` SHOULD never be `1`. +This attribute has stability level RELEASE CANDIDATE. **[4]:** It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. If the operation name is parsed from the query text, it SHOULD be the first operation name found in the query. For batch operations, if the individual operations are known to have the same operation name then that operation name SHOULD be used prepended by `BATCH `, otherwise `db.operation.name` SHOULD be `BATCH` or some other database system specific term if more applicable. +This attribute has stability level RELEASE CANDIDATE. **[5]:** Query parameters should only be captured when `db.query.text` is parameterized with placeholders. If a parameter has no name and instead is referenced only by index, then `` SHOULD be the 0-based index. +This attribute has stability level RELEASE CANDIDATE. **[6]:** For sanitization see [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). For batch operations, if the individual operations are known to have the same query text then that query text SHOULD be used, otherwise all of the individual query texts SHOULD be concatenated with separator `; ` or some other database system specific separator if more applicable. Even though parameterized query text can potentially have sensitive data, by using a parameterized query the user is giving a strong signal that any sensitive data will be passed as parameter values, and the benefit to observability of capturing the static part of the query text by default outweighs the risk. +This attribute has stability level RELEASE CANDIDATE. **[7]:** The status code returned by the database. Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes. Semantic conventions for individual database systems SHOULD document what `db.response.status_code` means in the context of that system. +This attribute has stability level RELEASE CANDIDATE. **[8]:** 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. +This attribute has stability level RELEASE CANDIDATE. `db.client.connection.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. @@ -65,62 +73,62 @@ Semantic conventions for individual database systems SHOULD document what `db.re `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 | -| -------------------- | --------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | -| `adabas` | Adabas (Adaptable Database System) | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `cache` | Deprecated, use `intersystems_cache` instead. | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Replaced by `intersystems_cache`. | -| `cassandra` | Apache Cassandra | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `clickhouse` | ClickHouse | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `cloudscape` | Deprecated, use `other_sql` instead. | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Replaced by `other_sql`. | -| `cockroachdb` | CockroachDB | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `coldfusion` | Deprecated, no replacement at this time. | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Removed. | -| `cosmosdb` | Microsoft Azure Cosmos DB | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `couchbase` | Couchbase | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `couchdb` | CouchDB | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `db2` | IBM Db2 | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `derby` | Apache Derby | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `dynamodb` | Amazon DynamoDB | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `edb` | EnterpriseDB | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `elasticsearch` | Elasticsearch | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `filemaker` | FileMaker | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `firebird` | Firebird | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `firstsql` | Deprecated, use `other_sql` instead. | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Replaced by `other_sql`. | -| `geode` | Apache Geode | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `h2` | H2 | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `hanadb` | SAP HANA | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `hbase` | Apache HBase | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `hive` | Apache Hive | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `hsqldb` | HyperSQL DataBase | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `influxdb` | InfluxDB | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `informix` | Informix | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `ingres` | Ingres | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `instantdb` | InstantDB | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `interbase` | InterBase | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `intersystems_cache` | InterSystems Caché | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `mariadb` | MariaDB | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `maxdb` | SAP MaxDB | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `memcached` | Memcached | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `mongodb` | MongoDB | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `mssql` | Microsoft SQL Server | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `mssqlcompact` | Deprecated, Microsoft SQL Server Compact is discontinued. | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Removed, use `other_sql` instead. | -| `mysql` | MySQL | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `neo4j` | Neo4j | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `netezza` | Netezza | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `opensearch` | OpenSearch | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `oracle` | Oracle Database | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `other_sql` | Some other SQL database. Fallback only. See notes. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `pervasive` | Pervasive PSQL | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `pointbase` | PointBase | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `postgresql` | PostgreSQL | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `progress` | Progress Database | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `redis` | Redis | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `redshift` | Amazon Redshift | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `spanner` | Cloud Spanner | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `sqlite` | SQLite | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `sybase` | Sybase | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `teradata` | Teradata | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `trino` | Trino | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `vertica` | Vertica | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| Value | Description | Stability | +| -------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | +| `adabas` | Adabas (Adaptable Database System) | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cache` | Deprecated, use `intersystems_cache` instead. | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Replaced by `intersystems_cache`. | +| `cassandra` | Apache Cassandra | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `clickhouse` | ClickHouse | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cloudscape` | Deprecated, use `other_sql` instead. | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Replaced by `other_sql`. | +| `cockroachdb` | CockroachDB | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `coldfusion` | Deprecated, no replacement at this time. | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Removed. | +| `cosmosdb` | Microsoft Azure Cosmos DB | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `couchbase` | Couchbase | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `couchdb` | CouchDB | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `db2` | IBM Db2 | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `derby` | Apache Derby | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `dynamodb` | Amazon DynamoDB | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `edb` | EnterpriseDB | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `elasticsearch` | Elasticsearch | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `filemaker` | FileMaker | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `firebird` | Firebird | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `firstsql` | Deprecated, use `other_sql` instead. | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Replaced by `other_sql`. | +| `geode` | Apache Geode | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `h2` | H2 | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `hanadb` | SAP HANA | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `hbase` | Apache HBase | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `hive` | Apache Hive | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `hsqldb` | HyperSQL DataBase | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `influxdb` | InfluxDB | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `informix` | Informix | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `ingres` | Ingres | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `instantdb` | InstantDB | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `interbase` | InterBase | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `intersystems_cache` | InterSystems Caché | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `mariadb` | MariaDB (This value has stability level RELEASE CANDIDATE) | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `maxdb` | SAP MaxDB | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `memcached` | Memcached | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `mongodb` | MongoDB | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `mssql` | Microsoft SQL Server (This value has stability level RELEASE CANDIDATE) | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `mssqlcompact` | Deprecated, Microsoft SQL Server Compact is discontinued. | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Removed, use `other_sql` instead. | +| `mysql` | MySQL (This value has stability level RELEASE CANDIDATE) | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `neo4j` | Neo4j | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `netezza` | Netezza | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `opensearch` | OpenSearch | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `oracle` | Oracle Database | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `other_sql` | Some other SQL database. Fallback only. See notes. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `pervasive` | Pervasive PSQL | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `pointbase` | PointBase | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `postgresql` | PostgreSQL (This value has stability level RELEASE CANDIDATE) | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `progress` | Progress Database | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `redis` | Redis | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `redshift` | Amazon Redshift | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `spanner` | Cloud Spanner | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `sqlite` | SQLite | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `sybase` | Sybase | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `teradata` | Teradata | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `trino` | Trino | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `vertica` | Vertica | ![Experimental](https://img.shields.io/badge/-experimental-blue) | ## Cassandra Attributes diff --git a/docs/database/README.md b/docs/database/README.md index fcc769028a..361708dbe7 100644 --- a/docs/database/README.md +++ b/docs/database/README.md @@ -7,7 +7,7 @@ path_base_for_github_subdir: # Semantic Conventions for Database Calls and Systems -**Status**: [Experimental][DocumentStatus] +**Status**: [Mixed][DocumentStatus] This document defines semantic conventions for database client spans as well as database metrics and logs. diff --git a/docs/database/cassandra.md b/docs/database/cassandra.md index cb23fea868..0449d0c37e 100644 --- a/docs/database/cassandra.md +++ b/docs/database/cassandra.md @@ -43,21 +43,25 @@ The Semantic Conventions for [Cassandra](https://cassandra.apache.org/) extend a **[1]:** It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. If the collection name is parsed from the query text, it SHOULD be the first collection name found in the query and it SHOULD match the value provided in the query text including any schema and database name prefix. For batch operations, if the individual operations are known to have the same collection name then that collection name SHOULD be used, otherwise `db.collection.name` SHOULD NOT be captured. +This attribute has stability level RELEASE CANDIDATE. **[2]:** If readily available. The collection name MAY be parsed from the query text, in which case it SHOULD be the first collection name found in the query. **[3]:** 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. +This attribute has stability level RELEASE CANDIDATE. **[4]:** It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. If the operation name is parsed from the query text, it SHOULD be the first operation name found in the query. For batch operations, if the individual operations are known to have the same operation name then that operation name SHOULD be used prepended by `BATCH `, otherwise `db.operation.name` SHOULD be `BATCH` or some other database system specific term if more applicable. +This attribute has stability level RELEASE CANDIDATE. **[5]:** If readily available. The operation name MAY be parsed from the query text, in which case it SHOULD be the first operation name found in the query. **[6]:** The status code returned by the database. Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes. Semantic conventions for individual database systems SHOULD document what `db.response.status_code` means in the context of that system. +This attribute has stability level RELEASE CANDIDATE. **[7]:** If the operation failed and status code is available. @@ -74,6 +78,7 @@ Instrumentations SHOULD document how `error.type` is populated. **[12]:** For sanitization see [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). For batch operations, if the individual operations are known to have the same query text then that query text SHOULD be used, otherwise all of the individual query texts SHOULD be concatenated with separator `; ` or some other database system specific separator if more applicable. Even though parameterized query text can potentially have sensitive data, by using a parameterized query the user is giving a strong signal that any sensitive data will be passed as parameter values, and the benefit to observability of capturing the static part of the query text by default outweighs the risk. +This attribute has stability level RELEASE CANDIDATE. **[13]:** SHOULD be collected by default only if there is sanitization that excludes sensitive information. See [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). @@ -83,6 +88,7 @@ Even though parameterized query text can potentially have sensitive data, by usi **[16]:** Query parameters should only be captured when `db.query.text` is parameterized with placeholders. If a parameter has no name and instead is referenced only by index, then `` SHOULD be the 0-based index. +This attribute has stability level RELEASE CANDIDATE. diff --git a/docs/database/cosmosdb.md b/docs/database/cosmosdb.md index d33c420ac4..465a37d4af 100644 --- a/docs/database/cosmosdb.md +++ b/docs/database/cosmosdb.md @@ -175,6 +175,7 @@ additional values when introducing new operations. **[5]:** The status code returned by the database. Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes. Semantic conventions for individual database systems SHOULD document what `db.response.status_code` means in the context of that system. +This attribute has stability level RELEASE CANDIDATE. **[6]:** The `error.type` SHOULD match the `db.response.status_code` returned by the database or the client library, or the canonical name of exception that occurred. When using canonical exception type name, instrumentation SHOULD do the best effort to report the most relevant type. For example, if the original exception is wrapped into a generic one, the original exception SHOULD be preferred. @@ -189,6 +190,7 @@ Instrumentations SHOULD document how `error.type` is populated. **[10]:** For sanitization see [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). For batch operations, if the individual operations are known to have the same query text then that query text SHOULD be used, otherwise all of the individual query texts SHOULD be concatenated with separator `; ` or some other database system specific separator if more applicable. Even though parameterized query text can potentially have sensitive data, by using a parameterized query the user is giving a strong signal that any sensitive data will be passed as parameter values, and the benefit to observability of capturing the static part of the query text by default outweighs the risk. +This attribute has stability level RELEASE CANDIDATE. **[11]:** SHOULD be collected by default only if there is sanitization that excludes sensitive information. See [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). @@ -200,6 +202,7 @@ Even though parameterized query text can potentially have sensitive data, by usi **[14]:** Query parameters should only be captured when `db.query.text` is parameterized with placeholders. If a parameter has no name and instead is referenced only by index, then `` SHOULD be the 0-based index. +This attribute has stability level RELEASE CANDIDATE. diff --git a/docs/database/couchdb.md b/docs/database/couchdb.md index 447047d519..f173e74099 100644 --- a/docs/database/couchdb.md +++ b/docs/database/couchdb.md @@ -35,6 +35,7 @@ The Semantic Conventions for [CouchDB](https://couchdb.apache.org/) extend and o **[3]:** The status code returned by the database. Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes. Semantic conventions for individual database systems SHOULD document what `db.response.status_code` means in the context of that system. +This attribute has stability level RELEASE CANDIDATE. **[4]:** If response was received and the HTTP response code is available. diff --git a/docs/database/database-metrics.md b/docs/database/database-metrics.md index af571e11e1..a92ceb0f88 100644 --- a/docs/database/database-metrics.md +++ b/docs/database/database-metrics.md @@ -4,12 +4,7 @@ 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. +**Status**: [Mixed][DocumentStatus] @@ -17,16 +12,17 @@ and attributes but more may be added in the future. - [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) +- [Experimental](#experimental) + - [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) @@ -60,7 +56,7 @@ and attributes but more may be added in the future. ### Metric: `db.client.operation.duration` -**Status**: [Experimental][DocumentStatus] +**Status**: [Release Candidate][DocumentStatus] This metric is [required][MetricRequired]. @@ -99,25 +95,30 @@ of `[ 0.001, 0.005, 0.01, 0.05, 0.1, 0.5, 1, 5, 10 ]`. | [`server.address`](/docs/attributes-registry/server.md) | string | Name of the database host. [13] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | **[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. +This attribute has stability level RELEASE CANDIDATE. **[2]:** It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. If the collection name is parsed from the query text, it SHOULD be the first collection name found in the query and it SHOULD match the value provided in the query text including any schema and database name prefix. For batch operations, if the individual operations are known to have the same collection name then that collection name SHOULD be used, otherwise `db.collection.name` SHOULD NOT be captured. +This attribute has stability level RELEASE CANDIDATE. **[3]:** If readily available. The collection name MAY be parsed from the query text, in which case it SHOULD be the first collection name 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. +This attribute has stability level RELEASE CANDIDATE. **[5]:** It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. If the operation name is parsed from the query text, it SHOULD be the first operation name found in the query. For batch operations, if the individual operations are known to have the same operation name then that operation name SHOULD be used prepended by `BATCH `, otherwise `db.operation.name` SHOULD be `BATCH` or some other database system specific term if more applicable. +This attribute has stability level RELEASE CANDIDATE. **[6]:** If readily available. The operation name MAY be parsed from the query text, in which case it SHOULD be the first operation name found in the query. **[7]:** The status code returned by the database. Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes. Semantic conventions for individual database systems SHOULD document what `db.response.status_code` means in the context of that system. +This attribute has stability level RELEASE CANDIDATE. **[8]:** If the operation failed and status code is available. @@ -166,12 +167,12 @@ If a database operation involved multiple network calls (for example retries), t | `instantdb` | InstantDB | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `interbase` | InterBase | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `intersystems_cache` | InterSystems Caché | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `mariadb` | MariaDB | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `mariadb` | MariaDB (This value has stability level RELEASE CANDIDATE) | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `maxdb` | SAP MaxDB | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `memcached` | Memcached | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `mongodb` | MongoDB | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `mssql` | Microsoft SQL Server | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `mysql` | MySQL | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `mssql` | Microsoft SQL Server (This value has stability level RELEASE CANDIDATE) | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `mysql` | MySQL (This value has stability level RELEASE CANDIDATE) | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `neo4j` | Neo4j | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `netezza` | Netezza | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `opensearch` | OpenSearch | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -179,7 +180,7 @@ If a database operation involved multiple network calls (for example retries), t | `other_sql` | Some other SQL database. Fallback only. See notes. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `pervasive` | Pervasive PSQL | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `pointbase` | PointBase | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `postgresql` | PostgreSQL | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `postgresql` | PostgreSQL (This value has stability level RELEASE CANDIDATE) | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `progress` | Progress Database | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `redis` | Redis | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `redshift` | Amazon Redshift | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -204,11 +205,13 @@ If a database operation involved multiple network calls (for example retries), t -## Connection pools +## Experimental + +### Connection pools The following metric instruments describe database client connection pool operations. -### Metric: `db.client.connection.count` +#### Metric: `db.client.connection.count` This metric is [required][MetricRequired]. @@ -241,7 +244,8 @@ This metric is [required][MetricRequired]. -### Metric: `db.client.connection.idle.max` + +#### Metric: `db.client.connection.idle.max` This metric is [recommended][MetricRecommended]. @@ -266,7 +270,7 @@ This metric is [recommended][MetricRecommended]. -### Metric: `db.client.connection.idle.min` +#### Metric: `db.client.connection.idle.min` This metric is [recommended][MetricRecommended]. @@ -291,7 +295,7 @@ This metric is [recommended][MetricRecommended]. -### Metric: `db.client.connection.max` +#### Metric: `db.client.connection.max` This metric is [recommended][MetricRecommended]. @@ -316,7 +320,7 @@ This metric is [recommended][MetricRecommended]. -### Metric: `db.client.connection.pending_requests` +#### Metric: `db.client.connection.pending_requests` This metric is [recommended][MetricRecommended]. @@ -341,7 +345,7 @@ This metric is [recommended][MetricRecommended]. -### Metric: `db.client.connection.timeouts` +#### Metric: `db.client.connection.timeouts` This metric is [recommended][MetricRecommended]. @@ -366,7 +370,7 @@ This metric is [recommended][MetricRecommended]. -### Metric: `db.client.connection.create_time` +#### Metric: `db.client.connection.create_time` This metric is [recommended][MetricRecommended]. @@ -391,7 +395,7 @@ This metric is [recommended][MetricRecommended]. -### Metric: `db.client.connection.wait_time` +#### Metric: `db.client.connection.wait_time` This metric is [recommended][MetricRecommended]. @@ -416,7 +420,7 @@ This metric is [recommended][MetricRecommended]. -### Metric: `db.client.connection.use_time` +#### Metric: `db.client.connection.use_time` This metric is [recommended][MetricRecommended]. diff --git a/docs/database/database-spans.md b/docs/database/database-spans.md index 96b810f026..687698bd91 100644 --- a/docs/database/database-spans.md +++ b/docs/database/database-spans.md @@ -4,7 +4,7 @@ linkTitle: Client Calls # Semantic Conventions for Database Client Calls -**Status**: [Experimental][DocumentStatus] +**Status**: [Release Candidate][DocumentStatus], unless otherwise specified @@ -105,25 +105,30 @@ These attributes will usually be the same for all operations performed over the | [`db.query.parameter.`](/docs/attributes-registry/db.md) | string | A query parameter used in `db.query.text`, with `` being the parameter name, and the attribute value being a string representation of the parameter value. [17] | `someval`; `55` | `Opt-In` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | **[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. +This attribute has stability level RELEASE CANDIDATE. **[2]:** It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. If the collection name is parsed from the query text, it SHOULD be the first collection name found in the query and it SHOULD match the value provided in the query text including any schema and database name prefix. For batch operations, if the individual operations are known to have the same collection name then that collection name SHOULD be used, otherwise `db.collection.name` SHOULD NOT be captured. +This attribute has stability level RELEASE CANDIDATE. **[3]:** If readily available. The collection name MAY be parsed from the query text, in which case 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. +This attribute has stability level RELEASE CANDIDATE. **[5]:** It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. If the operation name is parsed from the query text, it SHOULD be the first operation name found in the query. For batch operations, if the individual operations are known to have the same operation name then that operation name SHOULD be used prepended by `BATCH `, otherwise `db.operation.name` SHOULD be `BATCH` or some other database system specific term if more applicable. +This attribute has stability level RELEASE CANDIDATE. **[6]:** If readily available. The operation name MAY be parsed from the query text, in which case it SHOULD be the first operation name found in the query. **[7]:** The status code returned by the database. Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes. Semantic conventions for individual database systems SHOULD document what `db.response.status_code` means in the context of that system. +This attribute has stability level RELEASE CANDIDATE. **[8]:** If the operation failed and status code is available. @@ -140,6 +145,7 @@ Instrumentations SHOULD document how `error.type` is populated. **[13]:** For sanitization see [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). For batch operations, if the individual operations are known to have the same query text then that query text SHOULD be used, otherwise all of the individual query texts SHOULD be concatenated with separator `; ` or some other database system specific separator if more applicable. Even though parameterized query text can potentially have sensitive data, by using a parameterized query the user is giving a strong signal that any sensitive data will be passed as parameter values, and the benefit to observability of capturing the static part of the query text by default outweighs the risk. +This attribute has stability level RELEASE CANDIDATE. **[14]:** SHOULD be collected by default only if there is sanitization that excludes sensitive information. See [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). @@ -150,6 +156,7 @@ If a database operation involved multiple network calls (for example retries), t **[17]:** Query parameters should only be captured when `db.query.text` is parameterized with placeholders. If a parameter has no name and instead is referenced only by index, then `` SHOULD be the 0-based index. +This attribute has stability level RELEASE CANDIDATE. @@ -194,12 +201,12 @@ and SHOULD be provided **at span creation time** (if provided at all): | `instantdb` | InstantDB | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `interbase` | InterBase | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `intersystems_cache` | InterSystems Caché | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `mariadb` | MariaDB | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `mariadb` | MariaDB (This value has stability level RELEASE CANDIDATE) | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `maxdb` | SAP MaxDB | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `memcached` | Memcached | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `mongodb` | MongoDB | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `mssql` | Microsoft SQL Server | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `mysql` | MySQL | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `mssql` | Microsoft SQL Server (This value has stability level RELEASE CANDIDATE) | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `mysql` | MySQL (This value has stability level RELEASE CANDIDATE) | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `neo4j` | Neo4j | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `netezza` | Netezza | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `opensearch` | OpenSearch | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -207,7 +214,7 @@ and SHOULD be provided **at span creation time** (if provided at all): | `other_sql` | Some other SQL database. Fallback only. See notes. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `pervasive` | Pervasive PSQL | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `pointbase` | PointBase | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `postgresql` | PostgreSQL | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `postgresql` | PostgreSQL (This value has stability level RELEASE CANDIDATE) | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `progress` | Progress Database | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `redis` | Redis | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `redshift` | Amazon Redshift | ![Experimental](https://img.shields.io/badge/-experimental-blue) | diff --git a/docs/database/elasticsearch.md b/docs/database/elasticsearch.md index bcf734f6ba..3a09c874ed 100644 --- a/docs/database/elasticsearch.md +++ b/docs/database/elasticsearch.md @@ -64,6 +64,7 @@ Tracing instrumentations that do so, MUST also set `http.request.method_original **[5]:** The status code returned by the database. Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes. Semantic conventions for individual database systems SHOULD document what `db.response.status_code` means in the context of that system. +This attribute has stability level RELEASE CANDIDATE. **[6]:** The `error.type` SHOULD match the `db.response.status_code` returned by the database or the client library, or the canonical name of exception that occurred. When using canonical exception type name, instrumentation SHOULD do the best effort to report the most relevant type. For example, if the original exception is wrapped into a generic one, the original exception SHOULD be preferred. @@ -84,6 +85,7 @@ Instrumentations SHOULD document how `error.type` is populated. **[13]:** For sanitization see [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). For batch operations, if the individual operations are known to have the same query text then that query text SHOULD be used, otherwise all of the individual query texts SHOULD be concatenated with separator `; ` or some other database system specific separator if more applicable. Even though parameterized query text can potentially have sensitive data, by using a parameterized query the user is giving a strong signal that any sensitive data will be passed as parameter values, and the benefit to observability of capturing the static part of the query text by default outweighs the risk. +This attribute has stability level RELEASE CANDIDATE. **[14]:** Should be collected by default for search-type queries and only if there is sanitization that excludes sensitive information. diff --git a/docs/database/hbase.md b/docs/database/hbase.md index 047bdad37a..d915ce18f9 100644 --- a/docs/database/hbase.md +++ b/docs/database/hbase.md @@ -35,15 +35,18 @@ The Semantic Conventions for [HBase](https://hbase.apache.org/) extend and overr **[2]:** 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. +This attribute has stability level RELEASE CANDIDATE. **[3]:** It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. If the operation name is parsed from the query text, it SHOULD be the first operation name found in the query. For batch operations, if the individual operations are known to have the same operation name then that operation name SHOULD be used prepended by `BATCH `, otherwise `db.operation.name` SHOULD be `BATCH` or some other database system specific term if more applicable. +This attribute has stability level RELEASE CANDIDATE. **[4]:** If readily available. The operation name MAY be parsed from the query text, in which case it SHOULD be the first operation name found in the query. **[5]:** The status code returned by the database. Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes. Semantic conventions for individual database systems SHOULD document what `db.response.status_code` means in the context of that system. +This attribute has stability level RELEASE CANDIDATE. **[6]:** The `error.type` SHOULD match the `db.response.status_code` returned by the database or the client library, or the canonical name of exception that occurred. When using canonical exception type name, instrumentation SHOULD do the best effort to report the most relevant type. For example, if the original exception is wrapped into a generic one, the original exception SHOULD be preferred. diff --git a/docs/database/mariadb.md b/docs/database/mariadb.md index b927338527..d459947b31 100644 --- a/docs/database/mariadb.md +++ b/docs/database/mariadb.md @@ -4,7 +4,7 @@ linkTitle: MariaDB # Semantic Conventions for MariaDB -**Status**: [Experimental][DocumentStatus] +**Status**: [Release Candidate][DocumentStatus] The Semantic Conventions for *MariaDB* extend and override the [Database Semantic Conventions](database-spans.md). @@ -35,6 +35,7 @@ The Semantic Conventions for *MariaDB* extend and override the [Database Semanti **[1]:** It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. If the collection name is parsed from the query text, it SHOULD be the first collection name found in the query and it SHOULD match the value provided in the query text including any schema and database name prefix. For batch operations, if the individual operations are known to have the same collection name then that collection name SHOULD be used, otherwise `db.collection.name` SHOULD NOT be captured. +This attribute has stability level RELEASE CANDIDATE. **[2]:** If readily available. The collection name MAY be parsed from the query text, in which case it SHOULD be the first collection name found in the query. @@ -102,6 +103,7 @@ Instrumentations SHOULD document how `error.type` is populated. **[11]:** For sanitization see [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). For batch operations, if the individual operations are known to have the same query text then that query text SHOULD be used, otherwise all of the individual query texts SHOULD be concatenated with separator `; ` or some other database system specific separator if more applicable. Even though parameterized query text can potentially have sensitive data, by using a parameterized query the user is giving a strong signal that any sensitive data will be passed as parameter values, and the benefit to observability of capturing the static part of the query text by default outweighs the risk. +This attribute has stability level RELEASE CANDIDATE. **[12]:** SHOULD be collected by default only if there is sanitization that excludes sensitive information. See [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). @@ -109,6 +111,7 @@ Even though parameterized query text can potentially have sensitive data, by usi **[14]:** Query parameters should only be captured when `db.query.text` is parameterized with placeholders. If a parameter has no name and instead is referenced only by index, then `` SHOULD be the 0-based index. +This attribute has stability level RELEASE CANDIDATE. diff --git a/docs/database/mongodb.md b/docs/database/mongodb.md index db243d41c1..50b201a7ef 100644 --- a/docs/database/mongodb.md +++ b/docs/database/mongodb.md @@ -33,6 +33,7 @@ The Semantic Conventions for [MongoDB](https://www.mongodb.com/) extend and over **[1]:** It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. If the collection name is parsed from the query text, it SHOULD be the first collection name found in the query and it SHOULD match the value provided in the query text including any schema and database name prefix. For batch operations, if the individual operations are known to have the same collection name then that collection name SHOULD be used, otherwise `db.collection.name` SHOULD NOT be captured. +This attribute has stability level RELEASE CANDIDATE. **[2]:** See [MongoDB database commands](https://www.mongodb.com/docs/manual/reference/command/). @@ -40,6 +41,7 @@ For batch operations, if the individual operations are known to have the same co **[4]:** The status code returned by the database. Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes. Semantic conventions for individual database systems SHOULD document what `db.response.status_code` means in the context of that system. +This attribute has stability level RELEASE CANDIDATE. **[5]:** If the operation failed and error code is available. diff --git a/docs/database/mssql.md b/docs/database/mssql.md index f0275de77f..12e95b9691 100644 --- a/docs/database/mssql.md +++ b/docs/database/mssql.md @@ -4,7 +4,7 @@ linkTitle: MSSQL # Semantic Conventions for MSSQL -**Status**: [Experimental][DocumentStatus] +**Status**: [Release Candidate][DocumentStatus] The Semantic Conventions for the *Microsoft SQL Server* extend and override the [Database Semantic Conventions](database-spans.md). @@ -35,6 +35,7 @@ The Semantic Conventions for the *Microsoft SQL Server* extend and override the **[1]:** It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. If the collection name is parsed from the query text, it SHOULD be the first collection name found in the query and it SHOULD match the value provided in the query text including any schema and database name prefix. For batch operations, if the individual operations are known to have the same collection name then that collection name SHOULD be used, otherwise `db.collection.name` SHOULD NOT be captured. +This attribute has stability level RELEASE CANDIDATE. **[2]:** If readily available. The collection name MAY be parsed from the query text, in which case it SHOULD be the first collection name found in the query. @@ -72,6 +73,7 @@ Instrumentations SHOULD document how `error.type` is populated. **[11]:** For sanitization see [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). For batch operations, if the individual operations are known to have the same query text then that query text SHOULD be used, otherwise all of the individual query texts SHOULD be concatenated with separator `; ` or some other database system specific separator if more applicable. Even though parameterized query text can potentially have sensitive data, by using a parameterized query the user is giving a strong signal that any sensitive data will be passed as parameter values, and the benefit to observability of capturing the static part of the query text by default outweighs the risk. +This attribute has stability level RELEASE CANDIDATE. **[12]:** SHOULD be collected by default only if there is sanitization that excludes sensitive information. See [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). @@ -79,6 +81,7 @@ Even though parameterized query text can potentially have sensitive data, by usi **[14]:** Query parameters should only be captured when `db.query.text` is parameterized with placeholders. If a parameter has no name and instead is referenced only by index, then `` SHOULD be the 0-based index. +This attribute has stability level RELEASE CANDIDATE. diff --git a/docs/database/mysql.md b/docs/database/mysql.md index 700ba09762..e6ecc6e222 100644 --- a/docs/database/mysql.md +++ b/docs/database/mysql.md @@ -4,7 +4,7 @@ linkTitle: MySQL # Semantic Conventions for MySQL -**Status**: [Experimental][DocumentStatus] +**Status**: [Release Candidate][DocumentStatus] The Semantic Conventions for *MySQL* extend and override the [Database Semantic Conventions](database-spans.md). @@ -35,6 +35,7 @@ The Semantic Conventions for *MySQL* extend and override the [Database Semantic **[1]:** It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. If the collection name is parsed from the query text, it SHOULD be the first collection name found in the query and it SHOULD match the value provided in the query text including any schema and database name prefix. For batch operations, if the individual operations are known to have the same collection name then that collection name SHOULD be used, otherwise `db.collection.name` SHOULD NOT be captured. +This attribute has stability level RELEASE CANDIDATE. **[2]:** If readily available. The collection name MAY be parsed from the query text, in which case it SHOULD be the first collection name found in the query. @@ -102,6 +103,7 @@ Instrumentations SHOULD document how `error.type` is populated. **[11]:** For sanitization see [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). For batch operations, if the individual operations are known to have the same query text then that query text SHOULD be used, otherwise all of the individual query texts SHOULD be concatenated with separator `; ` or some other database system specific separator if more applicable. Even though parameterized query text can potentially have sensitive data, by using a parameterized query the user is giving a strong signal that any sensitive data will be passed as parameter values, and the benefit to observability of capturing the static part of the query text by default outweighs the risk. +This attribute has stability level RELEASE CANDIDATE. **[12]:** SHOULD be collected by default only if there is sanitization that excludes sensitive information. See [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). @@ -109,6 +111,7 @@ Even though parameterized query text can potentially have sensitive data, by usi **[14]:** Query parameters should only be captured when `db.query.text` is parameterized with placeholders. If a parameter has no name and instead is referenced only by index, then `` SHOULD be the 0-based index. +This attribute has stability level RELEASE CANDIDATE. diff --git a/docs/database/postgresql.md b/docs/database/postgresql.md index 2ff4a35b04..fde8480aca 100644 --- a/docs/database/postgresql.md +++ b/docs/database/postgresql.md @@ -4,7 +4,7 @@ linkTitle: PostgreSQL # Semantic Conventions for PostgreSQL -**Status**: [Experimental][DocumentStatus] +**Status**: [Release Candidate][DocumentStatus] The Semantic Conventions for *PostgreSQL* extend and override the [Database Semantic Conventions](database-spans.md). @@ -35,6 +35,7 @@ The Semantic Conventions for *PostgreSQL* extend and override the [Database Sema **[1]:** It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. If the collection name is parsed from the query text, it SHOULD be the first collection name found in the query and it SHOULD match the value provided in the query text including any schema and database name prefix. For batch operations, if the individual operations are known to have the same collection name then that collection name SHOULD be used, otherwise `db.collection.name` SHOULD NOT be captured. +This attribute has stability level RELEASE CANDIDATE. **[2]:** If readily available. The collection name MAY be parsed from the query text, in which case it SHOULD be the first collection name found in the query. @@ -109,6 +110,7 @@ Instrumentations SHOULD document how `error.type` is populated. **[11]:** For sanitization see [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). For batch operations, if the individual operations are known to have the same query text then that query text SHOULD be used, otherwise all of the individual query texts SHOULD be concatenated with separator `; ` or some other database system specific separator if more applicable. Even though parameterized query text can potentially have sensitive data, by using a parameterized query the user is giving a strong signal that any sensitive data will be passed as parameter values, and the benefit to observability of capturing the static part of the query text by default outweighs the risk. +This attribute has stability level RELEASE CANDIDATE. **[12]:** SHOULD be collected by default only if there is sanitization that excludes sensitive information. See [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). @@ -116,6 +118,7 @@ Even though parameterized query text can potentially have sensitive data, by usi **[14]:** Query parameters should only be captured when `db.query.text` is parameterized with placeholders. If a parameter has no name and instead is referenced only by index, then `` SHOULD be the 0-based index. +This attribute has stability level RELEASE CANDIDATE. diff --git a/docs/database/redis.md b/docs/database/redis.md index 77cea2473b..6157c40e92 100644 --- a/docs/database/redis.md +++ b/docs/database/redis.md @@ -44,11 +44,13 @@ Instrumentation SHOULD document if `db.namespace` reflects the database index pr **[2]:** It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. If the operation name is parsed from the query text, it SHOULD be the first operation name found in the query. For batch operations, if the individual operations are known to have the same operation name then that operation name SHOULD be used prepended by `BATCH `, otherwise `db.operation.name` SHOULD be `BATCH` or some other database system specific term if more applicable. +This attribute has stability level RELEASE CANDIDATE. **[3]:** If readily available. The operation name MAY be parsed from the query text, in which case it SHOULD be the first operation name found in the query. **[4]:** The status code returned by the database. Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes. Semantic conventions for individual database systems SHOULD document what `db.response.status_code` means in the context of that system. +This attribute has stability level RELEASE CANDIDATE. **[5]:** If the operation failed and status code is available. @@ -73,6 +75,7 @@ Parameterized query text SHOULD be collected by default (the query parameter val **[14]:** Query parameters should only be captured when `db.query.text` is parameterized with placeholders. If a parameter has no name and instead is referenced only by index, then `` SHOULD be the 0-based index. +This attribute has stability level RELEASE CANDIDATE. diff --git a/docs/database/sql.md b/docs/database/sql.md index 5ff03c6597..a4866d6d03 100644 --- a/docs/database/sql.md +++ b/docs/database/sql.md @@ -4,7 +4,7 @@ linkTitle: SQL # Semantic Conventions for SQL Databases -**Status**: [Experimental][DocumentStatus] +**Status**: [Release Candidate][DocumentStatus] The SQL databases Semantic Conventions describes how common [Database Semantic Conventions](database-spans.md) apply to SQL databases. @@ -59,6 +59,7 @@ Instrumentations applied to generic SQL drivers SHOULD adhere to SQL semantic co **[1]:** It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. If the collection name is parsed from the query text, it SHOULD be the first collection name found in the query and it SHOULD match the value provided in the query text including any schema and database name prefix. For batch operations, if the individual operations are known to have the same collection name then that collection name SHOULD be used, otherwise `db.collection.name` SHOULD NOT be captured. +This attribute has stability level RELEASE CANDIDATE. **[2]:** If readily available. The collection name MAY be parsed from the query text, in which case it SHOULD be the first collection name found in the query. @@ -134,6 +135,7 @@ Instrumentations SHOULD document how `error.type` is populated. **[11]:** For sanitization see [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). For batch operations, if the individual operations are known to have the same query text then that query text SHOULD be used, otherwise all of the individual query texts SHOULD be concatenated with separator `; ` or some other database system specific separator if more applicable. Even though parameterized query text can potentially have sensitive data, by using a parameterized query the user is giving a strong signal that any sensitive data will be passed as parameter values, and the benefit to observability of capturing the static part of the query text by default outweighs the risk. +This attribute has stability level RELEASE CANDIDATE. **[12]:** SHOULD be collected by default only if there is sanitization that excludes sensitive information. See [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). @@ -141,6 +143,7 @@ Even though parameterized query text can potentially have sensitive data, by usi **[14]:** Query parameters should only be captured when `db.query.text` is parameterized with placeholders. If a parameter has no name and instead is referenced only by index, then `` SHOULD be the 0-based index. +This attribute has stability level RELEASE CANDIDATE. diff --git a/model/database/metrics.yaml b/model/database/metrics.yaml index 716776b3cf..bc4985e323 100644 --- a/model/database/metrics.yaml +++ b/model/database/metrics.yaml @@ -7,7 +7,7 @@ groups: Batch operations SHOULD be recorded as a single operation. instrument: histogram unit: "s" - stability: experimental + stability: experimental # RELEASE CANDIDATE extends: attributes.db.client.minimal attributes: - ref: db.collection.name diff --git a/model/database/registry.yaml b/model/database/registry.yaml index ebe1c68af5..f55ab580f0 100644 --- a/model/database/registry.yaml +++ b/model/database/registry.yaml @@ -7,7 +7,7 @@ groups: attributes: - id: db.collection.name type: string - stability: experimental + stability: experimental # RELEASE CANDIDATE brief: The name of a collection (table, container) within the database. note: > It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. @@ -17,10 +17,12 @@ groups: For batch operations, if the individual operations are known to have the same collection name then that collection name SHOULD be used, otherwise `db.collection.name` SHOULD NOT be captured. + + This attribute has stability level RELEASE CANDIDATE. examples: ["public.users", "customers"] - id: db.namespace type: string - stability: experimental + stability: experimental # RELEASE CANDIDATE brief: > The name of the database, fully qualified within the server address and port. note: > @@ -33,10 +35,12 @@ groups: 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. + + This attribute has stability level RELEASE CANDIDATE. examples: ["customers", "test.users"] - id: db.operation.name type: string - stability: experimental + stability: experimental # RELEASE CANDIDATE brief: > The name of the operation or command being executed. note: > @@ -47,10 +51,12 @@ groups: For batch operations, if the individual operations are known to have the same operation name then that operation name SHOULD be used prepended by `BATCH `, otherwise `db.operation.name` SHOULD be `BATCH` or some other database system specific term if more applicable. + + This attribute has stability level RELEASE CANDIDATE. examples: ["findAndModify", "HMSET", "SELECT"] - id: db.query.text type: string - stability: experimental + stability: experimental # RELEASE CANDIDATE brief: > The database query being executed. note: > @@ -63,6 +69,8 @@ groups: Even though parameterized query text can potentially have sensitive data, by using a parameterized query the user is giving a strong signal that any sensitive data will be passed as parameter values, and the benefit to observability of capturing the static part of the query text by default outweighs the risk. + + This attribute has stability level RELEASE CANDIDATE. examples: [ "SELECT * FROM wuser_table where username = ?", @@ -70,7 +78,7 @@ groups: ] - id: db.query.parameter type: template[string] - stability: experimental + stability: experimental # RELEASE CANDIDATE brief: > A query parameter used in `db.query.text`, with `` being the parameter name, and the attribute value being a string representation of the parameter value. @@ -79,18 +87,22 @@ groups: If a parameter has no name and instead is referenced only by index, then `` SHOULD be the 0-based index. + + This attribute has stability level RELEASE CANDIDATE. examples: ["someval", "55"] - id: db.operation.batch.size type: int - stability: experimental + stability: experimental # RELEASE CANDIDATE brief: The number of queries included in a batch operation. note: > Operations are only considered batches when they contain two or more operations, and so `db.operation.batch.size` SHOULD never be `1`. + + This attribute has stability level RELEASE CANDIDATE. examples: [2, 3, 4] - id: db.response.status_code type: string - stability: experimental + stability: experimental # RELEASE CANDIDATE brief: Database response status code. note: > The status code returned by the database. Usually it represents an error code, @@ -99,6 +111,8 @@ groups: Semantic conventions for individual database systems SHOULD document what `db.response.status_code` means in the context of that system. + + This attribute has stability level RELEASE CANDIDATE. examples: ["102", "ORA-17002", "08P01", "404"] - id: db.system @@ -107,6 +121,8 @@ groups: 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. + + This attribute has stability level RELEASE CANDIDATE. type: members: - id: other_sql @@ -239,8 +255,8 @@ groups: stability: experimental - id: mariadb value: "mariadb" - brief: "MariaDB" - stability: experimental + brief: "MariaDB (This value has stability level RELEASE CANDIDATE)" + stability: experimental # RELEASE CANDIDATE - id: maxdb value: "maxdb" brief: "SAP MaxDB" @@ -255,8 +271,8 @@ groups: stability: experimental - id: mssql value: "mssql" - brief: "Microsoft SQL Server" - stability: experimental + brief: "Microsoft SQL Server (This value has stability level RELEASE CANDIDATE)" + stability: experimental # RELEASE CANDIDATE - id: mssqlcompact value: "mssqlcompact" deprecated: "Removed, use `other_sql` instead." @@ -264,8 +280,8 @@ groups: stability: experimental - id: mysql value: "mysql" - brief: "MySQL" - stability: experimental + brief: "MySQL (This value has stability level RELEASE CANDIDATE)" + stability: experimental # RELEASE CANDIDATE - id: neo4j value: "neo4j" brief: "Neo4j" @@ -292,8 +308,8 @@ groups: stability: experimental - id: postgresql value: "postgresql" - brief: "PostgreSQL" - stability: experimental + brief: "PostgreSQL (This value has stability level RELEASE CANDIDATE)" + stability: experimental # RELEASE CANDIDATE - id: progress value: "progress" brief: "Progress Database" @@ -330,7 +346,7 @@ groups: value: "vertica" brief: "Vertica" stability: experimental - stability: experimental + stability: experimental # RELEASE CANDIDATE - id: db.client.connection.state stability: experimental type: