diff --git a/docs/azure/events.md b/docs/azure/events.md index 43cc4c8998..dcf10fc02d 100644 --- a/docs/azure/events.md +++ b/docs/azure/events.md @@ -46,7 +46,7 @@ Describes Azure Resource Log event, see [Azure Resource Log Top-level Schema](ht > [!Warning] > This field contains sensitive (PII) information. -**[2]:** if the event is tied to an Active Directory tenant. +**[2] `tenant.id`:** if the event is tied to an Active Directory tenant. diff --git a/docs/database/cassandra.md b/docs/database/cassandra.md index 7d93e91b1a..d178b576d7 100644 --- a/docs/database/cassandra.md +++ b/docs/database/cassandra.md @@ -58,7 +58,7 @@ SHOULD NOT be captured. This attribute has stability level RELEASE CANDIDATE. -**[2]:** If readily available and if a database call is performed on a single collection. The collection name MAY be parsed from the query text, in which case it SHOULD be the single collection name in the query. +**[2] `db.collection.name`:** If readily available and if a database call is performed on a single collection. The collection name MAY be parsed from the query text, in which case it SHOULD be the single collection name in the query. **[3] `db.namespace`:** 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. @@ -80,13 +80,13 @@ system specific term if more applicable. This attribute has stability level RELEASE CANDIDATE. -**[5]:** If readily available and if there is a single operation name that describes the database call. The operation name MAY be parsed from the query text, in which case it SHOULD be the single operation name found in the query. +**[5] `db.operation.name`:** If readily available and if there is a single operation name that describes the database call. The operation name MAY be parsed from the query text, in which case it SHOULD be the single operation name found in the query. **[6] `db.response.status_code`:** 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. +**[7] `db.response.status_code`:** If the operation failed and status code is available. **[8] `error.type`:** 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. @@ -94,7 +94,7 @@ Instrumentations SHOULD document how `error.type` is populated. **[9] `server.port`:** 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. -**[10]:** If using a port other than the default port for this DBMS and if `server.address` is set. +**[10] `server.port`:** If using a port other than the default port for this DBMS and if `server.address` is set. **[11] `db.operation.batch.size`:** 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. @@ -103,14 +103,14 @@ This attribute has stability level RELEASE CANDIDATE. Summary may be available to the instrumentation through instrumentation hooks or other means. If it is not available, instrumentations that support query parsing SHOULD generate a summary following [Generating query summary](../../docs/database/database-spans.md#generating-a-summary-of-the-quey-text) section. This attribute has stability level RELEASE CANDIDATE. -**[13]:** if readily available or if instrumentation supports query summarization. +**[13] `db.query.summary`:** if readily available or if instrumentation supports query summarization. **[14] `db.query.text`:** 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. -**[15]:** Non-parameterized query text SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data, e.g. by redacting all literal values present in the query text. See [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). +**[15] `db.query.text`:** Non-parameterized query text SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data, e.g. by redacting all literal values present in the query text. See [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). Parameterized query text SHOULD be collected by default (the query parameter values themselves are opt-in, see [`db.operation.parameter.`](../../docs/attributes-registry/db.md)). **[16] `network.peer.address`:** If a database operation involved multiple network calls (for example retries), the address of the last contacted node SHOULD be used. diff --git a/docs/database/cosmosdb.md b/docs/database/cosmosdb.md index 1662719b38..75667bb8f4 100644 --- a/docs/database/cosmosdb.md +++ b/docs/database/cosmosdb.md @@ -62,7 +62,7 @@ Cosmos DB instrumentation includes call-level (public API) surface spans and net **[1] `db.collection.name`:** It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. -**[2]:** if not `gateway` (the default value is assumed to be `gateway`). +**[2] `db.cosmosdb.connection_mode`:** if not `gateway` (the default value is assumed to be `gateway`). **[3] `db.operation.name`:** The `db.operation.name` has the following list of well-known values. If one of them applies, then the respective value MUST be used. @@ -188,7 +188,7 @@ If none of them applies, it's RECOMMENDED to use language-agnostic representatio client method name in snake_case. Instrumentations SHOULD document additional values when introducing new operations. -**[4]:** If readily available and if there is a single operation name that describes the database call. The operation name MAY be parsed from the query text, in which case it SHOULD be the single operation name found in the query. +**[4] `db.operation.name`:** If readily available and if there is a single operation name that describes the database call. The operation name MAY be parsed from the query text, in which case it SHOULD be the single operation name found in the query. **[5] `db.response.status_code`:** 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. @@ -209,14 +209,14 @@ This attribute has stability level RELEASE CANDIDATE. Summary may be available to the instrumentation through instrumentation hooks or other means. If it is not available, instrumentations that support query parsing SHOULD generate a summary following [Generating query summary](../../docs/database/database-spans.md#generating-a-summary-of-the-quey-text) section. This attribute has stability level RELEASE CANDIDATE. -**[11]:** if readily available or if instrumentation supports query summarization. +**[11] `db.query.summary`:** if readily available or if instrumentation supports query summarization. **[12] `db.query.text`:** 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]:** Non-parameterized query text SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data, e.g. by redacting all literal values present in the query text. See [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). +**[13] `db.query.text`:** Non-parameterized query text SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data, e.g. by redacting all literal values present in the query text. See [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). Parameterized query text SHOULD be collected by default (the query parameter values themselves are opt-in, see [`db.operation.parameter.`](../../docs/attributes-registry/db.md)). **[14] `server.address`:** 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. @@ -363,13 +363,13 @@ system specific term if more applicable. This attribute has stability level RELEASE CANDIDATE. -**[3]:** If readily available and if there is a single operation name that describes the database call. The operation name MAY be parsed from the query text, in which case it SHOULD be the single operation name found in the query. +**[3] `db.operation.name`:** If readily available and if there is a single operation name that describes the database call. The operation name MAY be parsed from the query text, in which case it SHOULD be the single operation name found in the query. **[4] `db.response.status_code`:** 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. +**[5] `db.response.status_code`:** If the operation failed and status code is available. **[6] `error.type`:** 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. @@ -377,7 +377,7 @@ Instrumentations SHOULD document how `error.type` is populated. **[7] `server.port`:** 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. -**[8]:** If using a port other than the default port for this DBMS and if `server.address` is set. +**[8] `server.port`:** If using a port other than the default port for this DBMS and if `server.address` is set. **[9] `server.address`:** 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. @@ -426,7 +426,7 @@ It captures the number of active instances at any given time. Best practices dic **[1] `server.port`:** 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. -**[2]:** If using a port other than the default port for this DBMS and if `server.address` is set. +**[2] `server.port`:** If using a port other than the default port for this DBMS and if `server.address` is set. **[3] `server.address`:** 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. diff --git a/docs/database/couchdb.md b/docs/database/couchdb.md index d103d6b147..fe57cd4479 100644 --- a/docs/database/couchdb.md +++ b/docs/database/couchdb.md @@ -35,7 +35,7 @@ The Semantic Conventions for [CouchDB](https://couchdb.apache.org/) extend and o 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. -**[3]:** If response was received and the HTTP response code is available. +**[3] `db.response.status_code`:** If response was received and the HTTP response code is available. **[4] `error.type`:** 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. @@ -43,7 +43,7 @@ Instrumentations SHOULD document how `error.type` is populated. **[5] `server.port`:** 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. -**[6]:** If using a port other than the default port for this DBMS and if `server.address` is set. +**[6] `server.port`:** If using a port other than the default port for this DBMS and if `server.address` is set. **[7] `db.operation.batch.size`:** 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. diff --git a/docs/database/database-metrics.md b/docs/database/database-metrics.md index bcddca7eb3..b2a5cab8ae 100644 --- a/docs/database/database-metrics.md +++ b/docs/database/database-metrics.md @@ -115,7 +115,7 @@ SHOULD NOT be captured. This attribute has stability level RELEASE CANDIDATE. -**[3]:** If readily available and if a database call is performed on a single collection. The collection name MAY be parsed from the query text, in which case it SHOULD be the single collection name in the query. +**[3] `db.collection.name`:** If readily available and if a database call is performed on a single collection. The collection name MAY be parsed from the query text, in which case it SHOULD be the single collection name in the query. **[4] `db.namespace`:** 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. @@ -137,13 +137,13 @@ system specific term if more applicable. This attribute has stability level RELEASE CANDIDATE. -**[6]:** If readily available and if there is a single operation name that describes the database call. The operation name MAY be parsed from the query text, in which case it SHOULD be the single operation name found in the query. +**[6] `db.operation.name`:** If readily available and if there is a single operation name that describes the database call. The operation name MAY be parsed from the query text, in which case it SHOULD be the single operation name found in the query. **[7] `db.response.status_code`:** 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. +**[8] `db.response.status_code`:** If the operation failed and status code is available. **[9] `error.type`:** 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. @@ -151,13 +151,13 @@ Instrumentations SHOULD document how `error.type` is populated. **[10] `server.port`:** 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. -**[11]:** If using a port other than the default port for this DBMS and if `server.address` is set. +**[11] `server.port`:** If using a port other than the default port for this DBMS and if `server.address` is set. **[12] `db.query.summary`:** `db.query.summary` provides static summary of the query text. It describes a class of database queries and is useful as a grouping key, especially when analyzing telemetry for database calls involving complex queries. Summary may be available to the instrumentation through instrumentation hooks or other means. If it is not available, instrumentations that support query parsing SHOULD generate a summary following [Generating query summary](../../docs/database/database-spans.md#generating-a-summary-of-the-quey-text) section. This attribute has stability level RELEASE CANDIDATE. -**[13]:** if readily available or if instrumentation supports query summarization. +**[13] `db.query.summary`:** if readily available or if instrumentation supports query summarization. **[14] `network.peer.address`:** 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. @@ -300,7 +300,7 @@ SHOULD NOT be captured. This attribute has stability level RELEASE CANDIDATE. -**[3]:** If readily available and if a database call is performed on a single collection. The collection name MAY be parsed from the query text, in which case it SHOULD be the single collection name in the query. +**[3] `db.collection.name`:** If readily available and if a database call is performed on a single collection. The collection name MAY be parsed from the query text, in which case it SHOULD be the single collection name in the query. **[4] `db.namespace`:** 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. @@ -322,13 +322,13 @@ system specific term if more applicable. This attribute has stability level RELEASE CANDIDATE. -**[6]:** If readily available and if there is a single operation name that describes the database call. The operation name MAY be parsed from the query text, in which case it SHOULD be the single operation name found in the query. +**[6] `db.operation.name`:** If readily available and if there is a single operation name that describes the database call. The operation name MAY be parsed from the query text, in which case it SHOULD be the single operation name found in the query. **[7] `db.response.status_code`:** 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. +**[8] `db.response.status_code`:** If the operation failed and status code is available. **[9] `error.type`:** 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. @@ -336,13 +336,13 @@ Instrumentations SHOULD document how `error.type` is populated. **[10] `server.port`:** 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. -**[11]:** If using a port other than the default port for this DBMS and if `server.address` is set. +**[11] `server.port`:** If using a port other than the default port for this DBMS and if `server.address` is set. **[12] `db.query.summary`:** `db.query.summary` provides static summary of the query text. It describes a class of database queries and is useful as a grouping key, especially when analyzing telemetry for database calls involving complex queries. Summary may be available to the instrumentation through instrumentation hooks or other means. If it is not available, instrumentations that support query parsing SHOULD generate a summary following [Generating query summary](../../docs/database/database-spans.md#generating-a-summary-of-the-quey-text) section. This attribute has stability level RELEASE CANDIDATE. -**[13]:** if readily available or if instrumentation supports query summarization. +**[13] `db.query.summary`:** if readily available or if instrumentation supports query summarization. **[14] `network.peer.address`:** 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. diff --git a/docs/database/database-spans.md b/docs/database/database-spans.md index b7bda1fe06..9792853b28 100644 --- a/docs/database/database-spans.md +++ b/docs/database/database-spans.md @@ -133,7 +133,7 @@ SHOULD NOT be captured. This attribute has stability level RELEASE CANDIDATE. -**[3]:** If readily available and if a database call is performed on a single collection. The collection name MAY be parsed from the query text, in which case it SHOULD be the single collection name in the query. +**[3] `db.collection.name`:** If readily available and if a database call is performed on a single collection. The collection name MAY be parsed from the query text, in which case it SHOULD be the single collection name in the query. **[4] `db.namespace`:** 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. @@ -155,13 +155,13 @@ system specific term if more applicable. This attribute has stability level RELEASE CANDIDATE. -**[6]:** If readily available and if there is a single operation name that describes the database call. The operation name MAY be parsed from the query text, in which case it SHOULD be the single operation name found in the query. +**[6] `db.operation.name`:** If readily available and if there is a single operation name that describes the database call. The operation name MAY be parsed from the query text, in which case it SHOULD be the single operation name found in the query. **[7] `db.response.status_code`:** 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. +**[8] `db.response.status_code`:** If the operation failed and status code is available. **[9] `error.type`:** 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. @@ -169,7 +169,7 @@ Instrumentations SHOULD document how `error.type` is populated. **[10] `server.port`:** 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. -**[11]:** If using a port other than the default port for this DBMS and if `server.address` is set. +**[11] `server.port`:** If using a port other than the default port for this DBMS and if `server.address` is set. **[12] `db.operation.batch.size`:** 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. @@ -178,14 +178,14 @@ This attribute has stability level RELEASE CANDIDATE. Summary may be available to the instrumentation through instrumentation hooks or other means. If it is not available, instrumentations that support query parsing SHOULD generate a summary following [Generating query summary](../../docs/database/database-spans.md#generating-a-summary-of-the-quey-text) section. This attribute has stability level RELEASE CANDIDATE. -**[14]:** if readily available or if instrumentation supports query summarization. +**[14] `db.query.summary`:** if readily available or if instrumentation supports query summarization. **[15] `db.query.text`:** 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. -**[16]:** Non-parameterized query text SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data, e.g. by redacting all literal values present in the query text. See [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). +**[16] `db.query.text`:** Non-parameterized query text SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data, e.g. by redacting all literal values present in the query text. See [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). Parameterized query text SHOULD be collected by default (the query parameter values themselves are opt-in, see [`db.operation.parameter.`](../../docs/attributes-registry/db.md)). **[17] `network.peer.address`:** 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. diff --git a/docs/database/elasticsearch.md b/docs/database/elasticsearch.md index 8e8838a3cf..6ba8bf57fb 100644 --- a/docs/database/elasticsearch.md +++ b/docs/database/elasticsearch.md @@ -92,7 +92,7 @@ Instrumentations SHOULD document how `error.type` is populated. **[7] `server.port`:** 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. -**[8]:** If using a port other than the default port for this DBMS and if `server.address` is set. +**[8] `server.port`:** If using a port other than the default port for this DBMS and if `server.address` is set. **[9] `db.collection.name`:** The query may target multiple indices or data streams, in which case it SHOULD be a comma separated list of those. If the query doesn't target a specific index, this field MUST NOT be set. @@ -108,7 +108,7 @@ For batch operations, if the individual operations are known to have the same qu 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. +**[14] `db.query.text`:** Should be collected by default for search-type queries and only if there is sanitization that excludes sensitive information. **[15] `server.address`:** 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. diff --git a/docs/database/hbase.md b/docs/database/hbase.md index 7150655a03..a7a94ece17 100644 --- a/docs/database/hbase.md +++ b/docs/database/hbase.md @@ -62,7 +62,7 @@ Instrumentations SHOULD document how `error.type` is populated. **[6] `server.port`:** 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. -**[7]:** If using a port other than the default port for this DBMS and if `server.address` is set. +**[7] `server.port`:** If using a port other than the default port for this DBMS and if `server.address` is set. **[8] `db.operation.batch.size`:** 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. diff --git a/docs/database/mariadb.md b/docs/database/mariadb.md index d313f41cfb..8cb960584c 100644 --- a/docs/database/mariadb.md +++ b/docs/database/mariadb.md @@ -50,7 +50,7 @@ SHOULD NOT be captured. This attribute has stability level RELEASE CANDIDATE. -**[2]:** If readily available and if a database call is performed on a single collection. The collection name MAY be parsed from the query text, in which case it SHOULD be the single collection name in the query. +**[2] `db.collection.name`:** If readily available and if a database call is performed on a single collection. The collection name MAY be parsed from the query text, in which case it SHOULD be the single collection name in the query. **[3] `db.namespace`:** A connection's currently associated database may change during its lifetime, e.g. from executing `USE `. @@ -65,7 +65,7 @@ It is RECOMMENDED to capture the value as provided by the application without at **[4] `db.operation.name`:** This SHOULD be the SQL command such as `SELECT`, `INSERT`, `UPDATE`, `CREATE`, `DROP`. In the case of `EXEC`, this SHOULD be the stored procedure name that is being executed. -**[5]:** If readily available and if there is a single operation name that describes the database call. The operation name MAY be parsed from the query text, in which case it SHOULD be the single operation name found in the query. +**[5] `db.operation.name`:** If readily available and if there is a single operation name that describes the database call. The operation name MAY be parsed from the query text, in which case it SHOULD be the single operation name found in the query. **[6] `db.response.status_code`:** SQL defines [SQLSTATE](https://wikipedia.org/wiki/SQLSTATE) as a database return code which is adopted by some database systems like PostgreSQL. @@ -109,7 +109,7 @@ Instrumentations SHOULD document how `error.type` is populated. **[8] `server.port`:** 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. +**[9] `server.port`:** If using a port other than the default port for this DBMS and if `server.address` is set. **[10] `db.operation.batch.size`:** 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. @@ -118,14 +118,14 @@ This attribute has stability level RELEASE CANDIDATE. Summary may be available to the instrumentation through instrumentation hooks or other means. If it is not available, instrumentations that support query parsing SHOULD generate a summary following [Generating query summary](../../docs/database/database-spans.md#generating-a-summary-of-the-quey-text) section. This attribute has stability level RELEASE CANDIDATE. -**[12]:** if readily available or if instrumentation supports query summarization. +**[12] `db.query.summary`:** if readily available or if instrumentation supports query summarization. **[13] `db.query.text`:** 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]:** Non-parameterized query text SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data, e.g. by redacting all literal values present in the query text. See [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). +**[14] `db.query.text`:** Non-parameterized query text SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data, e.g. by redacting all literal values present in the query text. See [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). Parameterized query text SHOULD be collected by default (the query parameter values themselves are opt-in, see [`db.operation.parameter.`](../../docs/attributes-registry/db.md)). **[15] `server.address`:** 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. diff --git a/docs/database/mongodb.md b/docs/database/mongodb.md index 2d8d48fea5..6f0bbb54d8 100644 --- a/docs/database/mongodb.md +++ b/docs/database/mongodb.md @@ -52,7 +52,7 @@ This attribute has stability level RELEASE CANDIDATE. 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 the operation failed and error code is available. +**[4] `db.response.status_code`:** If the operation failed and error code is available. **[5] `error.type`:** 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. @@ -60,7 +60,7 @@ Instrumentations SHOULD document how `error.type` is populated. **[6] `server.port`:** 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. -**[7]:** If using a port other than the default port for this DBMS and if `server.address` is set. +**[7] `server.port`:** If using a port other than the default port for this DBMS and if `server.address` is set. **[8] `db.operation.batch.size`:** 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. diff --git a/docs/database/mssql.md b/docs/database/mssql.md index 475c8ff80e..078d7bd848 100644 --- a/docs/database/mssql.md +++ b/docs/database/mssql.md @@ -50,7 +50,7 @@ SHOULD NOT be captured. This attribute has stability level RELEASE CANDIDATE. -**[2]:** If readily available and if a database call is performed on a single collection. The collection name MAY be parsed from the query text, in which case it SHOULD be the single collection name in the query. +**[2] `db.collection.name`:** If readily available and if a database call is performed on a single collection. The collection name MAY be parsed from the query text, in which case it SHOULD be the single collection name in the query. **[3] `db.namespace`:** When connected to a default instance, `db.namespace` SHOULD be set to the name of the database. When connected to a [named instance](https://learn.microsoft.com/sql/connect/jdbc/building-the-connection-url#named-and-multiple-sql-server-instances), @@ -69,7 +69,7 @@ It is RECOMMENDED to capture the value as provided by the application without at **[4] `db.operation.name`:** This SHOULD be the SQL command such as `SELECT`, `INSERT`, `UPDATE`, `CREATE`, `DROP`. In the case of `EXEC`, this SHOULD be the stored procedure name that is being executed. -**[5]:** If readily available and if there is a single operation name that describes the database call. The operation name MAY be parsed from the query text, in which case it SHOULD be the single operation name found in the query. +**[5] `db.operation.name`:** If readily available and if there is a single operation name that describes the database call. The operation name MAY be parsed from the query text, in which case it SHOULD be the single operation name found in the query. **[6] `db.response.status_code`:** Microsoft SQL Server does not report SQLSTATE. @@ -79,7 +79,7 @@ Instrumentations SHOULD document how `error.type` is populated. **[8] `server.port`:** 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. +**[9] `server.port`:** If using a port other than the default port for this DBMS and if `server.address` is set. **[10] `db.operation.batch.size`:** 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. @@ -88,14 +88,14 @@ This attribute has stability level RELEASE CANDIDATE. Summary may be available to the instrumentation through instrumentation hooks or other means. If it is not available, instrumentations that support query parsing SHOULD generate a summary following [Generating query summary](../../docs/database/database-spans.md#generating-a-summary-of-the-quey-text) section. This attribute has stability level RELEASE CANDIDATE. -**[12]:** if readily available or if instrumentation supports query summarization. +**[12] `db.query.summary`:** if readily available or if instrumentation supports query summarization. **[13] `db.query.text`:** 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]:** Non-parameterized query text SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data, e.g. by redacting all literal values present in the query text. See [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). +**[14] `db.query.text`:** Non-parameterized query text SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data, e.g. by redacting all literal values present in the query text. See [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). Parameterized query text SHOULD be collected by default (the query parameter values themselves are opt-in, see [`db.operation.parameter.`](../../docs/attributes-registry/db.md)). **[15] `server.address`:** 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. diff --git a/docs/database/mysql.md b/docs/database/mysql.md index 7ad61d747b..f53f35ae16 100644 --- a/docs/database/mysql.md +++ b/docs/database/mysql.md @@ -50,7 +50,7 @@ SHOULD NOT be captured. This attribute has stability level RELEASE CANDIDATE. -**[2]:** If readily available and if a database call is performed on a single collection. The collection name MAY be parsed from the query text, in which case it SHOULD be the single collection name in the query. +**[2] `db.collection.name`:** If readily available and if a database call is performed on a single collection. The collection name MAY be parsed from the query text, in which case it SHOULD be the single collection name in the query. **[3] `db.namespace`:** A connection's currently associated database may change during its lifetime, e.g. from executing `USE `. @@ -65,7 +65,7 @@ It is RECOMMENDED to capture the value as provided by the application without at **[4] `db.operation.name`:** This SHOULD be the SQL command such as `SELECT`, `INSERT`, `UPDATE`, `CREATE`, `DROP`. In the case of `EXEC`, this SHOULD be the stored procedure name that is being executed. -**[5]:** If readily available and if there is a single operation name that describes the database call. The operation name MAY be parsed from the query text, in which case it SHOULD be the single operation name found in the query. +**[5] `db.operation.name`:** If readily available and if there is a single operation name that describes the database call. The operation name MAY be parsed from the query text, in which case it SHOULD be the single operation name found in the query. **[6] `db.response.status_code`:** SQL defines [SQLSTATE](https://wikipedia.org/wiki/SQLSTATE) as a database return code which is adopted by some database systems like PostgreSQL. @@ -109,7 +109,7 @@ Instrumentations SHOULD document how `error.type` is populated. **[8] `server.port`:** 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. +**[9] `server.port`:** If using a port other than the default port for this DBMS and if `server.address` is set. **[10] `db.operation.batch.size`:** 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. @@ -118,14 +118,14 @@ This attribute has stability level RELEASE CANDIDATE. Summary may be available to the instrumentation through instrumentation hooks or other means. If it is not available, instrumentations that support query parsing SHOULD generate a summary following [Generating query summary](../../docs/database/database-spans.md#generating-a-summary-of-the-quey-text) section. This attribute has stability level RELEASE CANDIDATE. -**[12]:** if readily available or if instrumentation supports query summarization. +**[12] `db.query.summary`:** if readily available or if instrumentation supports query summarization. **[13] `db.query.text`:** 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]:** Non-parameterized query text SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data, e.g. by redacting all literal values present in the query text. See [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). +**[14] `db.query.text`:** Non-parameterized query text SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data, e.g. by redacting all literal values present in the query text. See [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). Parameterized query text SHOULD be collected by default (the query parameter values themselves are opt-in, see [`db.operation.parameter.`](../../docs/attributes-registry/db.md)). **[15] `server.address`:** 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. diff --git a/docs/database/postgresql.md b/docs/database/postgresql.md index 9f1586f42c..cf5736fe5f 100644 --- a/docs/database/postgresql.md +++ b/docs/database/postgresql.md @@ -50,7 +50,7 @@ SHOULD NOT be captured. This attribute has stability level RELEASE CANDIDATE. -**[2]:** If readily available and if a database call is performed on a single collection. The collection name MAY be parsed from the query text, in which case it SHOULD be the single collection name in the query. +**[2] `db.collection.name`:** If readily available and if a database call is performed on a single collection. The collection name MAY be parsed from the query text, in which case it SHOULD be the single collection name in the query. **[3] `db.namespace`:** `db.namespace` SHOULD be set to the combination of database and schema name following the `{database}.{schema}` pattern. @@ -72,7 +72,7 @@ It is RECOMMENDED to capture the value as provided by the application without at **[4] `db.operation.name`:** This SHOULD be the SQL command such as `SELECT`, `INSERT`, `UPDATE`, `CREATE`, `DROP`. In the case of `EXEC`, this SHOULD be the stored procedure name that is being executed. -**[5]:** If readily available and if there is a single operation name that describes the database call. The operation name MAY be parsed from the query text, in which case it SHOULD be the single operation name found in the query. +**[5] `db.operation.name`:** If readily available and if there is a single operation name that describes the database call. The operation name MAY be parsed from the query text, in which case it SHOULD be the single operation name found in the query. **[6] `db.response.status_code`:** SQL defines [SQLSTATE](https://wikipedia.org/wiki/SQLSTATE) as a database return code which is adopted by some database systems like PostgreSQL. @@ -116,7 +116,7 @@ Instrumentations SHOULD document how `error.type` is populated. **[8] `server.port`:** 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. +**[9] `server.port`:** If using a port other than the default port for this DBMS and if `server.address` is set. **[10] `db.operation.batch.size`:** 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. @@ -125,14 +125,14 @@ This attribute has stability level RELEASE CANDIDATE. Summary may be available to the instrumentation through instrumentation hooks or other means. If it is not available, instrumentations that support query parsing SHOULD generate a summary following [Generating query summary](../../docs/database/database-spans.md#generating-a-summary-of-the-quey-text) section. This attribute has stability level RELEASE CANDIDATE. -**[12]:** if readily available or if instrumentation supports query summarization. +**[12] `db.query.summary`:** if readily available or if instrumentation supports query summarization. **[13] `db.query.text`:** 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]:** Non-parameterized query text SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data, e.g. by redacting all literal values present in the query text. See [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). +**[14] `db.query.text`:** Non-parameterized query text SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data, e.g. by redacting all literal values present in the query text. See [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). Parameterized query text SHOULD be collected by default (the query parameter values themselves are opt-in, see [`db.operation.parameter.`](../../docs/attributes-registry/db.md)). **[15] `server.address`:** 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. diff --git a/docs/database/redis.md b/docs/database/redis.md index 46ff5ec2a5..599ab64c7d 100644 --- a/docs/database/redis.md +++ b/docs/database/redis.md @@ -62,13 +62,13 @@ system specific term if more applicable. This attribute has stability level RELEASE CANDIDATE. -**[3]:** If readily available and if there is a single operation name that describes the database call. The operation name MAY be parsed from the query text, in which case it SHOULD be the single operation name found in the query. +**[3] `db.operation.name`:** If readily available and if there is a single operation name that describes the database call. The operation name MAY be parsed from the query text, in which case it SHOULD be the single operation name found in the query. **[4] `db.response.status_code`:** 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. +**[5] `db.response.status_code`:** If the operation failed and status code is available. **[6] `error.type`:** 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. @@ -76,14 +76,14 @@ Instrumentations SHOULD document how `error.type` is populated. **[7] `server.port`:** 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. -**[8]:** If using a port other than the default port for this DBMS and if `server.address` is set. +**[8] `server.port`:** If using a port other than the default port for this DBMS and if `server.address` is set. **[9] `db.operation.batch.size`:** 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. **[10] `db.query.text`:** For **Redis**, the value provided for `db.query.text` SHOULD correspond to the syntax of the Redis CLI. If, for example, the [`HMSET` command](https://redis.io/commands/hmset) is invoked, `"HMSET myhash field1 'Hello' field2 'World'"` would be a suitable value for `db.query.text`. -**[11]:** Non-parameterized query text SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data, e.g. by redacting all literal values present in the query text. +**[11] `db.query.text`:** Non-parameterized query text SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data, e.g. by redacting all literal values present in the query text. See [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). Parameterized query text SHOULD be collected by default (the query parameter values themselves are opt-in, see [`db.operation.parameter.`](../../docs/attributes-registry/db.md)). diff --git a/docs/database/sql.md b/docs/database/sql.md index 65ee866da4..af808272f2 100644 --- a/docs/database/sql.md +++ b/docs/database/sql.md @@ -74,7 +74,7 @@ SHOULD NOT be captured. This attribute has stability level RELEASE CANDIDATE. -**[2]:** If readily available and if a database call is performed on a single collection. The collection name MAY be parsed from the query text, in which case it SHOULD be the single collection name in the query. +**[2] `db.collection.name`:** If readily available and if a database call is performed on a single collection. The collection name MAY be parsed from the query text, in which case it SHOULD be the single collection name in the query. **[3] `db.namespace`:** If a database system has multiple namespace components (e.g. schema name and database name), they SHOULD be concatenated (potentially using database system specific conventions) from most general to most @@ -97,7 +97,7 @@ It is RECOMMENDED to capture the value as provided by the application without at **[4] `db.operation.name`:** This SHOULD be the SQL command such as `SELECT`, `INSERT`, `UPDATE`, `CREATE`, `DROP`. In the case of `EXEC`, this SHOULD be the stored procedure name that is being executed. -**[5]:** If readily available and if there is a single operation name that describes the database call. The operation name MAY be parsed from the query text, in which case it SHOULD be the single operation name found in the query. +**[5] `db.operation.name`:** If readily available and if there is a single operation name that describes the database call. The operation name MAY be parsed from the query text, in which case it SHOULD be the single operation name found in the query. **[6] `db.response.status_code`:** SQL defines [SQLSTATE](https://wikipedia.org/wiki/SQLSTATE) as a database return code which is adopted by some database systems like PostgreSQL. @@ -141,7 +141,7 @@ Instrumentations SHOULD document how `error.type` is populated. **[8] `server.port`:** 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. +**[9] `server.port`:** If using a port other than the default port for this DBMS and if `server.address` is set. **[10] `db.operation.batch.size`:** 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. @@ -150,14 +150,14 @@ This attribute has stability level RELEASE CANDIDATE. Summary may be available to the instrumentation through instrumentation hooks or other means. If it is not available, instrumentations that support query parsing SHOULD generate a summary following [Generating query summary](../../docs/database/database-spans.md#generating-a-summary-of-the-quey-text) section. This attribute has stability level RELEASE CANDIDATE. -**[12]:** if readily available or if instrumentation supports query summarization. +**[12] `db.query.summary`:** if readily available or if instrumentation supports query summarization. **[13] `db.query.text`:** 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]:** Non-parameterized query text SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data, e.g. by redacting all literal values present in the query text. See [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). +**[14] `db.query.text`:** Non-parameterized query text SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data, e.g. by redacting all literal values present in the query text. See [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). Parameterized query text SHOULD be collected by default (the query parameter values themselves are opt-in, see [`db.operation.parameter.`](../../docs/attributes-registry/db.md)). **[15] `server.address`:** 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. diff --git a/docs/dotnet/dotnet-aspnetcore-metrics.md b/docs/dotnet/dotnet-aspnetcore-metrics.md index aa2daa4aaa..10213cb41c 100644 --- a/docs/dotnet/dotnet-aspnetcore-metrics.md +++ b/docs/dotnet/dotnet-aspnetcore-metrics.md @@ -111,7 +111,7 @@ it's RECOMMENDED to: - Use a domain-specific attribute - Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not. -**[2]:** if and only if the exception was handled by this handler. +**[2] `aspnetcore.diagnostics.handler.type`:** if and only if the exception was handled by this handler. `aspnetcore.diagnostics.exception.result` 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. @@ -156,7 +156,7 @@ All rate-limiting metrics are reported by the `Microsoft.AspNetCore.RateLimiting |---|---|---|---|---|---| | [`aspnetcore.rate_limiting.policy`](/docs/attributes-registry/aspnetcore.md) | string | Rate limiting policy name. | `fixed`; `sliding`; `token` | `Conditionally Required` [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | -**[1]:** if the matched endpoint for the request had a rate-limiting policy. +**[1] `aspnetcore.rate_limiting.policy`:** if the matched endpoint for the request had a rate-limiting policy. @@ -186,7 +186,7 @@ of `[ 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10 |---|---|---|---|---|---| | [`aspnetcore.rate_limiting.policy`](/docs/attributes-registry/aspnetcore.md) | string | Rate limiting policy name. | `fixed`; `sliding`; `token` | `Conditionally Required` [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | -**[1]:** if the matched endpoint for the request had a rate-limiting policy. +**[1] `aspnetcore.rate_limiting.policy`:** if the matched endpoint for the request had a rate-limiting policy. @@ -212,7 +212,7 @@ of `[ 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10 |---|---|---|---|---|---| | [`aspnetcore.rate_limiting.policy`](/docs/attributes-registry/aspnetcore.md) | string | Rate limiting policy name. | `fixed`; `sliding`; `token` | `Conditionally Required` [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | -**[1]:** if the matched endpoint for the request had a rate-limiting policy. +**[1] `aspnetcore.rate_limiting.policy`:** if the matched endpoint for the request had a rate-limiting policy. @@ -243,7 +243,7 @@ of `[ 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10 | [`aspnetcore.rate_limiting.result`](/docs/attributes-registry/aspnetcore.md) | string | Rate-limiting result, shows whether the lease was acquired or contains a rejection reason | `acquired`; `request_canceled` | `Required` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | [`aspnetcore.rate_limiting.policy`](/docs/attributes-registry/aspnetcore.md) | string | Rate limiting policy name. | `fixed`; `sliding`; `token` | `Conditionally Required` [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | -**[1]:** if the matched endpoint for the request had a rate-limiting policy. +**[1] `aspnetcore.rate_limiting.policy`:** if the matched endpoint for the request had a rate-limiting policy. `aspnetcore.rate_limiting.result` 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. @@ -284,7 +284,7 @@ Meter name: `Microsoft.AspNetCore.RateLimiting`; Added in: ASP.NET Core 8.0 | [`aspnetcore.rate_limiting.result`](/docs/attributes-registry/aspnetcore.md) | string | Rate-limiting result, shows whether the lease was acquired or contains a rejection reason | `acquired`; `request_canceled` | `Required` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | [`aspnetcore.rate_limiting.policy`](/docs/attributes-registry/aspnetcore.md) | string | Rate limiting policy name. | `fixed`; `sliding`; `token` | `Conditionally Required` [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | -**[1]:** if the matched endpoint for the request had a rate-limiting policy. +**[1] `aspnetcore.rate_limiting.policy`:** if the matched endpoint for the request had a rate-limiting policy. `aspnetcore.rate_limiting.result` 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. diff --git a/docs/exceptions/exceptions-logs.md b/docs/exceptions/exceptions-logs.md index 58b83c7ade..c799931ae2 100644 --- a/docs/exceptions/exceptions-logs.md +++ b/docs/exceptions/exceptions-logs.md @@ -48,9 +48,9 @@ The table below indicates which attributes should be added to the | [`exception.type`](/docs/attributes-registry/exception.md) | string | The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it. | `java.net.ConnectException`; `OSError` | `Conditionally Required` [2] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | [`exception.stacktrace`](/docs/attributes-registry/exception.md) | string | A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG. | `Exception in thread "main" java.lang.RuntimeException: Test exception\n at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\n at com.example.GenerateTrace.main(GenerateTrace.java:5)` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | -**[1]:** Required if `exception.type` is not set, recommended otherwise. +**[1] `exception.message`:** Required if `exception.type` is not set, recommended otherwise. -**[2]:** Required if `exception.message` is not set, recommended otherwise. +**[2] `exception.type`:** Required if `exception.message` is not set, recommended otherwise. diff --git a/docs/exceptions/exceptions-spans.md b/docs/exceptions/exceptions-spans.md index ea634f37d6..ab2cef6f29 100644 --- a/docs/exceptions/exceptions-spans.md +++ b/docs/exceptions/exceptions-spans.md @@ -60,9 +60,9 @@ This event describes a single exception. | [`exception.escaped`](/docs/attributes-registry/exception.md) | boolean | SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span. [3] | | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | [`exception.stacktrace`](/docs/attributes-registry/exception.md) | string | A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG. | `Exception in thread "main" java.lang.RuntimeException: Test exception\n at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\n at com.example.GenerateTrace.main(GenerateTrace.java:5)` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | -**[1]:** Required if `exception.type` is not set, recommended otherwise. +**[1] `exception.message`:** Required if `exception.type` is not set, recommended otherwise. -**[2]:** Required if `exception.message` is not set, recommended otherwise. +**[2] `exception.type`:** Required if `exception.message` is not set, recommended otherwise. **[3] `exception.escaped`:** An exception is considered to have escaped (or left) the scope of a span, if that span is ended while the exception is still logically "in flight". diff --git a/docs/faas/faas-spans.md b/docs/faas/faas-spans.md index 3428f037f6..c5d4f9c53b 100644 --- a/docs/faas/faas-spans.md +++ b/docs/faas/faas-spans.md @@ -207,7 +207,7 @@ which the invoked FaaS instance reports about itself, if it's instrumented. **[3] `faas.invoked_region`:** SHOULD be equal to the `cloud.region` resource attribute of the invoked function. -**[4]:** For some cloud providers, like AWS or GCP, the region in which a function is hosted is essential to uniquely identify the function and also part of its endpoint. Since it's part of the endpoint being called, the region is always known to clients. In these cases, `faas.invoked_region` MUST be set accordingly. If the region is unknown to the client or not required for identifying the invoked function, setting `faas.invoked_region` is optional. +**[4] `faas.invoked_region`:** For some cloud providers, like AWS or GCP, the region in which a function is hosted is essential to uniquely identify the function and also part of its endpoint. Since it's part of the endpoint being called, the region is always known to clients. In these cases, `faas.invoked_region` MUST be set accordingly. If the region is unknown to the client or not required for identifying the invoked function, setting `faas.invoked_region` is optional. `faas.invoked_provider` 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. diff --git a/docs/feature-flags/feature-flags-logs.md b/docs/feature-flags/feature-flags-logs.md index 063d256c37..fbeae201fd 100644 --- a/docs/feature-flags/feature-flags-logs.md +++ b/docs/feature-flags/feature-flags-logs.md @@ -81,16 +81,16 @@ A `feature_flag.evaluation` event SHOULD be emitted whenever a feature flag valu | `type_mismatch` | The type of the flag value does not match the expected type. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `general` | The error was for a reason not enumerated above. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -**[2]:** If and only if an error occurred during flag evaluation. +**[2] `error.type`:** If and only if an error occurred during flag evaluation. **[3] `feature_flag.variant`:** A semantic identifier, commonly referred to as a variant, provides a means for referring to a value without including the value itself. This can provide additional context for understanding the meaning behind a value. For example, the variant `red` maybe be used for the value `#c05543`. -**[4]:** If feature flag provider supplies a variant or equivalent concept. +**[4] `feature_flag.variant`:** If feature flag provider supplies a variant or equivalent concept. -**[5]:** If and only if an error occurred. It's NOT RECOMMENDED to duplicate the value of `error.type` in `feature_flag.evaluation.error.message`. +**[5] `feature_flag.evaluation.error.message`:** If and only if an error occurred. It's NOT RECOMMENDED to duplicate the value of `error.type` in `feature_flag.evaluation.error.message`. `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. @@ -118,7 +118,7 @@ For example, the variant `red` maybe be used for the value `#c05543`. |---|---|---|---|---|---| | `value` | undefined | The evaluated value of the feature flag. | `#ff0000`; `1`; `true` | `Conditionally Required` [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -**[1]:** If and only if feature flag provider does not supply variant or equivalent concept. Otherwise, `value` should be treated as opt-in. +**[1] `value`:** If and only if feature flag provider does not supply variant or equivalent concept. Otherwise, `value` should be treated as opt-in. diff --git a/docs/gen-ai/openai.md b/docs/gen-ai/openai.md index ce9114ecde..12287b6e9f 100644 --- a/docs/gen-ai/openai.md +++ b/docs/gen-ai/openai.md @@ -66,9 +66,9 @@ attributes and ones specific the OpenAI. the canonical name of exception that occurred, or another low-cardinality error identifier. Instrumentations SHOULD document the list of errors they report. -**[4]:** if the request includes a service_tier and the value is not 'auto' +**[4] `gen_ai.openai.request.service_tier`:** if the request includes a service_tier and the value is not 'auto' -**[5]:** if the response was received and includes a service_tier +**[5] `gen_ai.openai.response.service_tier`:** if the response was received and includes a service_tier **[6] `server.port`:** 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. diff --git a/docs/http/http-metrics.md b/docs/http/http-metrics.md index eb29e75803..0a094fe0e6 100644 --- a/docs/http/http-metrics.md +++ b/docs/http/http-metrics.md @@ -129,7 +129,7 @@ SHOULD include the [application root](/docs/http/http-spans.md#http-server-defin **[5] `network.protocol.name`:** The value SHOULD be normalized to lowercase. -**[6]:** If not `http` and `network.protocol.version` is set. +**[6] `network.protocol.name`:** If not `http` and `network.protocol.version` is set. **[7] `network.protocol.version`:** If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set. @@ -304,7 +304,7 @@ SHOULD include the [application root](/docs/http/http-spans.md#http-server-defin **[5] `network.protocol.name`:** The value SHOULD be normalized to lowercase. -**[6]:** If not `http` and `network.protocol.version` is set. +**[6] `network.protocol.name`:** If not `http` and `network.protocol.version` is set. **[7] `network.protocol.version`:** If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set. @@ -412,7 +412,7 @@ SHOULD include the [application root](/docs/http/http-spans.md#http-server-defin **[5] `network.protocol.name`:** The value SHOULD be normalized to lowercase. -**[6]:** If not `http` and `network.protocol.version` is set. +**[6] `network.protocol.name`:** If not `http` and `network.protocol.version` is set. **[7] `network.protocol.version`:** If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set. @@ -525,7 +525,7 @@ If the request has completed successfully, instrumentations SHOULD NOT set `erro **[5] `network.protocol.name`:** The value SHOULD be normalized to lowercase. -**[6]:** If not `http` and `network.protocol.version` is set. +**[6] `network.protocol.name`:** If not `http` and `network.protocol.version` is set. **[7] `network.protocol.version`:** If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set. @@ -624,7 +624,7 @@ If the request has completed successfully, instrumentations SHOULD NOT set `erro **[5] `network.protocol.name`:** The value SHOULD be normalized to lowercase. -**[6]:** If not `http` and `network.protocol.version` is set. +**[6] `network.protocol.name`:** If not `http` and `network.protocol.version` is set. **[7] `url.template`:** The `url.template` MUST have low cardinality. It is not usually available on HTTP clients, but may be known by the application or specialized HTTP instrumentation. @@ -723,7 +723,7 @@ If the request has completed successfully, instrumentations SHOULD NOT set `erro **[5] `network.protocol.name`:** The value SHOULD be normalized to lowercase. -**[6]:** If not `http` and `network.protocol.version` is set. +**[6] `network.protocol.name`:** If not `http` and `network.protocol.version` is set. **[7] `url.template`:** The `url.template` MUST have low cardinality. It is not usually available on HTTP clients, but may be known by the application or specialized HTTP instrumentation. diff --git a/docs/http/http-spans.md b/docs/http/http-spans.md index 56aadc55a8..6dbd01c9b6 100644 --- a/docs/http/http-spans.md +++ b/docs/http/http-spans.md @@ -223,11 +223,11 @@ additional filters are applied. If the request has completed successfully, instrumentations SHOULD NOT set `error.type`. -**[6]:** If and only if it's different than `http.request.method`. +**[6] `http.request.method_original`:** If and only if it's different than `http.request.method`. **[7] `network.protocol.name`:** The value SHOULD be normalized to lowercase. -**[8]:** If not `http` and `network.protocol.version` is set. +**[8] `network.protocol.name`:** If not `http` and `network.protocol.version` is set. **[9] `http.request.resend_count`:** The resend count SHOULD be updated each time an HTTP request gets resent by the client, regardless of what was the cause of the resending (e.g. redirection, authorization failure, 503 Server Unavailable, network issues, or any other). @@ -441,14 +441,14 @@ additional filters are applied. If the request has completed successfully, instrumentations SHOULD NOT set `error.type`. -**[5]:** If and only if it's different than `http.request.method`. +**[5] `http.request.method_original`:** If and only if it's different than `http.request.method`. **[6] `http.route`:** MUST NOT be populated when this is not supported by the HTTP server framework as the route attribute should have low-cardinality and the URI path can NOT substitute it. SHOULD include the [application root](/docs/http/http-spans.md#http-server-definitions) if there is one. **[7] `network.protocol.name`:** The value SHOULD be normalized to lowercase. -**[8]:** If not `http` and `network.protocol.version` is set. +**[8] `network.protocol.name`:** If not `http` and `network.protocol.version` is set. **[9] `server.port`:** See [Setting `server.address` and `server.port` attributes](/docs/http/http-spans.md#setting-serveraddress-and-serverport-attributes). diff --git a/docs/messaging/azure-messaging.md b/docs/messaging/azure-messaging.md index 2334c6a8d7..7c8a26aa92 100644 --- a/docs/messaging/azure-messaging.md +++ b/docs/messaging/azure-messaging.md @@ -99,16 +99,16 @@ it's RECOMMENDED to: **[3] `messaging.batch.message_count`:** Instrumentations SHOULD NOT set `messaging.batch.message_count` on spans that operate with a single message. When a messaging client library supports both batch and single-message API for the same operation, instrumentations SHOULD use `messaging.batch.message_count` for batching APIs and SHOULD NOT use it for single-message APIs. -**[4]:** If the span describes an operation on a batch of messages. +**[4] `messaging.batch.message_count`:** If the span describes an operation on a batch of messages. **[5] `messaging.destination.name`:** Destination name SHOULD uniquely identify a specific queue, topic or other entity within the broker. If the broker doesn't have such notion, the destination name SHOULD uniquely identify the broker. -**[6]:** If span describes operation on a single message or if the value applies to all messages in the batch. +**[6] `messaging.destination.name`:** If span describes operation on a single message or if the value applies to all messages in the batch. **[7] `messaging.operation.type`:** If a custom value is used, it MUST be of low cardinality. -**[8]:** If delivery count is available and is bigger than 0. +**[8] `messaging.servicebus.message.delivery_count`:** If delivery count is available and is bigger than 0. **[9] `server.address`:** Server domain name of the broker if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. @@ -216,12 +216,12 @@ it's RECOMMENDED to: **[3] `messaging.batch.message_count`:** Instrumentations SHOULD NOT set `messaging.batch.message_count` on spans that operate with a single message. When a messaging client library supports both batch and single-message API for the same operation, instrumentations SHOULD use `messaging.batch.message_count` for batching APIs and SHOULD NOT use it for single-message APIs. -**[4]:** If the span describes an operation on a batch of messages. +**[4] `messaging.batch.message_count`:** If the span describes an operation on a batch of messages. **[5] `messaging.destination.name`:** Destination name SHOULD uniquely identify a specific queue, topic or other entity within the broker. If the broker doesn't have such notion, the destination name SHOULD uniquely identify the broker. -**[6]:** If span describes operation on a single message or if the value applies to all messages in the batch. +**[6] `messaging.destination.name`:** If span describes operation on a single message or if the value applies to all messages in the batch. **[7] `messaging.operation.type`:** If a custom value is used, it MUST be of low cardinality. diff --git a/docs/messaging/gcp-pubsub.md b/docs/messaging/gcp-pubsub.md index e1fb577f63..2e490d9cfa 100644 --- a/docs/messaging/gcp-pubsub.md +++ b/docs/messaging/gcp-pubsub.md @@ -96,12 +96,12 @@ it's RECOMMENDED to: **[3] `messaging.batch.message_count`:** Instrumentations SHOULD NOT set `messaging.batch.message_count` on spans that operate with a single message. When a messaging client library supports both batch and single-message API for the same operation, instrumentations SHOULD use `messaging.batch.message_count` for batching APIs and SHOULD NOT use it for single-message APIs. -**[4]:** If the span describes an operation on a batch of messages. +**[4] `messaging.batch.message_count`:** If the span describes an operation on a batch of messages. **[5] `messaging.destination.name`:** Destination name SHOULD uniquely identify a specific queue, topic or other entity within the broker. If the broker doesn't have such notion, the destination name SHOULD uniquely identify the broker. -**[6]:** If span describes operation on a single message or if the value applies to all messages in the batch. +**[6] `messaging.destination.name`:** If span describes operation on a single message or if the value applies to all messages in the batch. **[7] `messaging.operation.type`:** If a custom value is used, it MUST be of low cardinality. diff --git a/docs/messaging/kafka.md b/docs/messaging/kafka.md index 730ef38ad8..7164141dfe 100644 --- a/docs/messaging/kafka.md +++ b/docs/messaging/kafka.md @@ -97,14 +97,14 @@ it's RECOMMENDED to: **[2] `messaging.batch.message_count`:** Instrumentations SHOULD NOT set `messaging.batch.message_count` on spans that operate with a single message. When a messaging client library supports both batch and single-message API for the same operation, instrumentations SHOULD use `messaging.batch.message_count` for batching APIs and SHOULD NOT use it for single-message APIs. -**[3]:** If the span describes an operation on a batch of messages. +**[3] `messaging.batch.message_count`:** If the span describes an operation on a batch of messages. **[4] `messaging.destination.name`:** Destination name SHOULD uniquely identify a specific queue, topic or other entity within the broker. If the broker doesn't have such notion, the destination name SHOULD uniquely identify the broker. -**[5]:** If span describes operation on a single message or if the value applies to all messages in the batch. +**[5] `messaging.destination.name`:** If span describes operation on a single message or if the value applies to all messages in the batch. -**[6]:** If value is `true`. When missing, the value is assumed to be `false`. +**[6] `messaging.kafka.message.tombstone`:** If value is `true`. When missing, the value is assumed to be `false`. **[7] `messaging.operation.type`:** If a custom value is used, it MUST be of low cardinality. diff --git a/docs/messaging/messaging-metrics.md b/docs/messaging/messaging-metrics.md index 82f492b809..72f1cf2eb1 100644 --- a/docs/messaging/messaging-metrics.md +++ b/docs/messaging/messaging-metrics.md @@ -110,7 +110,7 @@ it's RECOMMENDED to: **[4] `messaging.destination.name`:** Destination name SHOULD uniquely identify a specific queue, topic or other entity within the broker. If the broker doesn't have such notion, the destination name SHOULD uniquely identify the broker. -**[5]:** if and only if `messaging.destination.name` is known to have low cardinality. Otherwise, `messaging.destination.template` MAY be populated. +**[5] `messaging.destination.name`:** if and only if `messaging.destination.name` is known to have low cardinality. Otherwise, `messaging.destination.template` MAY be populated. **[6] `messaging.destination.subscription.name`:** Semantic conventions for individual messaging systems SHOULD document whether `messaging.destination.subscription.name` is applicable and what it means in the context of that system. @@ -214,7 +214,7 @@ it's RECOMMENDED to: **[3] `messaging.destination.name`:** Destination name SHOULD uniquely identify a specific queue, topic or other entity within the broker. If the broker doesn't have such notion, the destination name SHOULD uniquely identify the broker. -**[4]:** if and only if `messaging.destination.name` is known to have low cardinality. Otherwise, `messaging.destination.template` MAY be populated. +**[4] `messaging.destination.name`:** if and only if `messaging.destination.name` is known to have low cardinality. Otherwise, `messaging.destination.template` MAY be populated. **[5] `messaging.destination.template`:** Destination names could be constructed from templates. An example would be a destination name involving a user name or product id. Although the destination name in this case is of high cardinality, the underlying template is of low cardinality and can be effectively used for grouping and aggregation. @@ -309,7 +309,7 @@ it's RECOMMENDED to: **[4] `messaging.destination.name`:** Destination name SHOULD uniquely identify a specific queue, topic or other entity within the broker. If the broker doesn't have such notion, the destination name SHOULD uniquely identify the broker. -**[5]:** if and only if `messaging.destination.name` is known to have low cardinality. Otherwise, `messaging.destination.template` MAY be populated. +**[5] `messaging.destination.name`:** if and only if `messaging.destination.name` is known to have low cardinality. Otherwise, `messaging.destination.template` MAY be populated. **[6] `messaging.destination.subscription.name`:** Semantic conventions for individual messaging systems SHOULD document whether `messaging.destination.subscription.name` is applicable and what it means in the context of that system. @@ -409,7 +409,7 @@ it's RECOMMENDED to: **[4] `messaging.destination.name`:** Destination name SHOULD uniquely identify a specific queue, topic or other entity within the broker. If the broker doesn't have such notion, the destination name SHOULD uniquely identify the broker. -**[5]:** if and only if `messaging.destination.name` is known to have low cardinality. Otherwise, `messaging.destination.template` MAY be populated. +**[5] `messaging.destination.name`:** if and only if `messaging.destination.name` is known to have low cardinality. Otherwise, `messaging.destination.template` MAY be populated. **[6] `messaging.destination.subscription.name`:** Semantic conventions for individual messaging systems SHOULD document whether `messaging.destination.subscription.name` is applicable and what it means in the context of that system. diff --git a/docs/messaging/messaging-spans.md b/docs/messaging/messaging-spans.md index 6ef38a52d0..2bdbcd1298 100644 --- a/docs/messaging/messaging-spans.md +++ b/docs/messaging/messaging-spans.md @@ -411,24 +411,24 @@ it's RECOMMENDED to: **[3] `messaging.batch.message_count`:** Instrumentations SHOULD NOT set `messaging.batch.message_count` on spans that operate with a single message. When a messaging client library supports both batch and single-message API for the same operation, instrumentations SHOULD use `messaging.batch.message_count` for batching APIs and SHOULD NOT use it for single-message APIs. -**[4]:** If the span describes an operation on a batch of messages. +**[4] `messaging.batch.message_count`:** If the span describes an operation on a batch of messages. **[5] `messaging.consumer.group.name`:** Semantic conventions for individual messaging systems SHOULD document whether `messaging.consumer.group.name` is applicable and what it means in the context of that system. -**[6]:** If value is `true`. When missing, the value is assumed to be `false`. +**[6] `messaging.destination.anonymous`:** If value is `true`. When missing, the value is assumed to be `false`. **[7] `messaging.destination.name`:** Destination name SHOULD uniquely identify a specific queue, topic or other entity within the broker. If the broker doesn't have such notion, the destination name SHOULD uniquely identify the broker. -**[8]:** If span describes operation on a single message or if the value applies to all messages in the batch. +**[8] `messaging.destination.name`:** If span describes operation on a single message or if the value applies to all messages in the batch. **[9] `messaging.destination.subscription.name`:** Semantic conventions for individual messaging systems SHOULD document whether `messaging.destination.subscription.name` is applicable and what it means in the context of that system. **[10] `messaging.destination.template`:** Destination names could be constructed from templates. An example would be a destination name involving a user name or product id. Although the destination name in this case is of high cardinality, the underlying template is of low cardinality and can be effectively used for grouping and aggregation. -**[11]:** If available. Instrumentations MUST NOT use `messaging.destination.name` as template unless low-cardinality of destination name is guaranteed. +**[11] `messaging.destination.template`:** If available. Instrumentations MUST NOT use `messaging.destination.name` as template unless low-cardinality of destination name is guaranteed. -**[12]:** If value is `true`. When missing, the value is assumed to be `false`. +**[12] `messaging.destination.temporary`:** If value is `true`. When missing, the value is assumed to be `false`. **[13] `messaging.operation.type`:** If a custom value is used, it MUST be of low cardinality. diff --git a/docs/messaging/rabbitmq.md b/docs/messaging/rabbitmq.md index c07e597d8b..440edc516b 100644 --- a/docs/messaging/rabbitmq.md +++ b/docs/messaging/rabbitmq.md @@ -89,7 +89,7 @@ it's RECOMMENDED to: **[2] `messaging.destination.name`:** Destination name SHOULD uniquely identify a specific queue, topic or other entity within the broker. If the broker doesn't have such notion, the destination name SHOULD uniquely identify the broker. -**[3]:** If span describes operation on a single message or if the value applies to all messages in the batch. +**[3] `messaging.destination.name`:** If span describes operation on a single message or if the value applies to all messages in the batch. **[4] `messaging.operation.type`:** If a custom value is used, it MUST be of low cardinality. diff --git a/docs/messaging/rocketmq.md b/docs/messaging/rocketmq.md index 04dca45b2c..8eeb14def1 100644 --- a/docs/messaging/rocketmq.md +++ b/docs/messaging/rocketmq.md @@ -93,18 +93,18 @@ it's RECOMMENDED to: **[2] `messaging.batch.message_count`:** Instrumentations SHOULD NOT set `messaging.batch.message_count` on spans that operate with a single message. When a messaging client library supports both batch and single-message API for the same operation, instrumentations SHOULD use `messaging.batch.message_count` for batching APIs and SHOULD NOT use it for single-message APIs. -**[3]:** If the span describes an operation on a batch of messages. +**[3] `messaging.batch.message_count`:** If the span describes an operation on a batch of messages. **[4] `messaging.destination.name`:** Destination name SHOULD uniquely identify a specific queue, topic or other entity within the broker. If the broker doesn't have such notion, the destination name SHOULD uniquely identify the broker. -**[5]:** If span describes operation on a single message or if the value applies to all messages in the batch. +**[5] `messaging.destination.name`:** If span describes operation on a single message or if the value applies to all messages in the batch. **[6] `messaging.operation.type`:** If a custom value is used, it MUST be of low cardinality. -**[7]:** If the message type is delay and delivery timestamp is not specified. +**[7] `messaging.rocketmq.message.delay_time_level`:** If the message type is delay and delivery timestamp is not specified. -**[8]:** If the message type is delay and delay time level is not specified. +**[8] `messaging.rocketmq.message.delivery_timestamp`:** If the message type is delay and delay time level is not specified. **[9] `server.address`:** Server domain name of the broker if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. diff --git a/docs/resource/process.md b/docs/resource/process.md index 97bd2e2e64..ba90335671 100644 --- a/docs/resource/process.md +++ b/docs/resource/process.md @@ -46,15 +46,15 @@ | [`process.parent_pid`](/docs/attributes-registry/process.md) | int | Parent Process identifier (PPID). | `111` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | [`process.pid`](/docs/attributes-registry/process.md) | int | Process identifier (PID). | `1234` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -**[1]:** See [Selecting process attributes](#selecting-process-attributes) for details. +**[1] `process.command`:** See [Selecting process attributes](#selecting-process-attributes) for details. -**[2]:** See [Selecting process attributes](#selecting-process-attributes) for details. +**[2] `process.command_args`:** See [Selecting process attributes](#selecting-process-attributes) for details. -**[3]:** See [Selecting process attributes](#selecting-process-attributes) for details. +**[3] `process.command_line`:** See [Selecting process attributes](#selecting-process-attributes) for details. -**[4]:** See [Selecting process attributes](#selecting-process-attributes) for details. +**[4] `process.executable.name`:** See [Selecting process attributes](#selecting-process-attributes) for details. -**[5]:** See [Selecting process attributes](#selecting-process-attributes) for details. +**[5] `process.executable.path`:** See [Selecting process attributes](#selecting-process-attributes) for details. diff --git a/docs/rpc/connect-rpc.md b/docs/rpc/connect-rpc.md index ef1e205238..16c1f09172 100644 --- a/docs/rpc/connect-rpc.md +++ b/docs/rpc/connect-rpc.md @@ -29,7 +29,7 @@ Below is a table of attributes that SHOULD be included on client and server Conn | [`rpc.connect_rpc.request.metadata.`](/docs/attributes-registry/rpc.md) | string[] | Connect request metadata, `` being the normalized Connect Metadata key (lowercase), the value being the metadata values. [2] | `rpc.request.metadata.my-custom-metadata-attribute=["1.2.3.4", "1.2.3.5"]` | `Opt-In` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | [`rpc.connect_rpc.response.metadata.`](/docs/attributes-registry/rpc.md) | string[] | Connect response metadata, `` being the normalized Connect Metadata key (lowercase), the value being the metadata values. [3] | `rpc.response.metadata.my-custom-metadata-attribute=["attribute_value"]` | `Opt-In` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -**[1]:** If response is not successful and if error code available. +**[1] `rpc.connect_rpc.error_code`:** If response is not successful and if error code available. **[2] `rpc.connect_rpc.request.metadata`:** Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured. Including all request metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. diff --git a/docs/rpc/rpc-spans.md b/docs/rpc/rpc-spans.md index 9e14b1d8dd..7ddf82cf4e 100644 --- a/docs/rpc/rpc-spans.md +++ b/docs/rpc/rpc-spans.md @@ -118,7 +118,7 @@ Generally, a user SHOULD NOT set `peer.service` to a fully qualified RPC service **[2] `server.port`:** 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. -**[3]:** if the port is supported by the network transport used for communication. +**[3] `server.port`:** if the port is supported by the network transport used for communication. **[4] `network.transport`:** The value SHOULD be normalized to lowercase. @@ -191,7 +191,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345. **[2] `server.port`:** 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. -**[3]:** if the port is supported by the network transport used for communication. +**[3] `server.port`:** if the port is supported by the network transport used for communication. **[4] `client.address`:** When observed from the server side, and when communicating through an intermediary, `client.address` SHOULD represent the client address behind any intermediaries, for example proxies, if it's available. diff --git a/docs/system/container-metrics.md b/docs/system/container-metrics.md index 3ddf5a1957..69af1b7525 100644 --- a/docs/system/container-metrics.md +++ b/docs/system/container-metrics.md @@ -35,7 +35,7 @@ This metric is [opt-in][MetricOptIn]. **[1] `cpu.mode`:** Following states SHOULD be used: `user`, `system`, `kernel` -**[2]:** Required if mode is available, i.e. metrics coming from the Docker Stats API. +**[2] `cpu.mode`:** Required if mode is available, i.e. metrics coming from the Docker Stats API. `cpu.mode` 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. @@ -78,7 +78,7 @@ This metric is [opt-in][MetricOptIn]. **[1] `cpu.mode`:** Following states SHOULD be used: `user`, `system`, `kernel` -**[2]:** Required if mode is available, i.e. metrics coming from the Docker Stats API. +**[2] `cpu.mode`:** Required if mode is available, i.e. metrics coming from the Docker Stats API. `cpu.mode` 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. diff --git a/templates/registry/markdown/attribute_table.j2 b/templates/registry/markdown/attribute_table.j2 index e8756b9fbd..ffd7ca6b10 100644 --- a/templates/registry/markdown/attribute_table.j2 +++ b/templates/registry/markdown/attribute_table.j2 @@ -8,6 +8,6 @@ {#- Macro for creating attribute table -#} {% macro generate(attributes, tag_filter, attribute_registry_base_url, lineage_attributes) %}{% if (tag_filter | length == 0) %}{% set filtered_attributes = attributes %}{% else %}{% set filtered_attributes = attributes | selectattr("tag", "in", tag_filter) %}{% endif %}{% if filtered_attributes | length > 0 %}| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| -{% for attribute in filtered_attributes | attribute_sort %}| {{ attrs.name_with_link(attribute, attribute_registry_base_url, lineage_attributes) }} | {{ attrs.type(attribute) }} | {{ attribute.brief | trim }}{{ notes.add({"note": attribute.note, "name": attribute.name}) }} | {{ examples.format(attribute) | trim }} | {{ requirement.render(attribute.requirement_level, notes) | trim }} | {{ stability.badge(attribute.stability, attribute.deprecated) | trim }} | +{% for attribute in filtered_attributes | attribute_sort %}| {{ attrs.name_with_link(attribute, attribute_registry_base_url, lineage_attributes) }} | {{ attrs.type(attribute) }} | {{ attribute.brief | trim }}{{ notes.add({"note": attribute.note, "name": attribute.name}) }} | {{ examples.format(attribute) | trim }} | {{ requirement.render({"level": attribute.requirement_level, "name": attribute.name}, notes) | trim }} | {{ stability.badge(attribute.stability, attribute.deprecated) | trim }} | {% endfor %}{{ notes.render() }}{{ sampling.snippet(filtered_attributes, attribute_registry_base_url, lineage_attributes) }}{{ enums.tables(filtered_attributes | selectattr("type", "mapping"), notes) }} {% endif %}{% endmacro %} diff --git a/templates/registry/markdown/body_field_table.j2 b/templates/registry/markdown/body_field_table.j2 index a941c74afa..ca97a077f0 100644 --- a/templates/registry/markdown/body_field_table.j2 +++ b/templates/registry/markdown/body_field_table.j2 @@ -10,6 +10,6 @@ {#- Macro for creating body table -#} {% macro generate(fields) %}{% if (fields | length > 0) %}{% set ns = namespace(flat=[])%}{% set _ = flatten(fields, ns, 0) %}| Body Field | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| -{% for f in ns.flat %}| {{ field_name(f.field, f.depth) }} | {{ f.field.type }} | {{ f.field.brief | trim }}{{ notes.add({"note": f.field.note}) }} | {{ examples.format(f.field) | trim }} | {{ requirement.render(f.field.requirement_level, notes) | trim }} | {{ stability.badge(f.field.stability, f.field.deprecated) | trim }} | +{% for f in ns.flat %}| {{ field_name(f.field, f.depth) }} | {{ f.field.type }} | {{ f.field.brief | trim }}{{ notes.add({"note": f.field.note}) }} | {{ examples.format(f.field) | trim }} | {{ requirement.render({"level": f.field.requirement_level, "name": f.field.id}, notes) | trim }} | {{ stability.badge(f.field.stability, f.field.deprecated) | trim }} | {% endfor %}{{ notes.render() }}{{ enums.field_tables(ns.flat | map(attribute="field") | selectattr("type", "eq", "enum"), notes) -}} {%- endif %}{% endmacro %} diff --git a/templates/registry/markdown/requirement.j2 b/templates/registry/markdown/requirement.j2 index 584c78cf2d..1f5714de33 100644 --- a/templates/registry/markdown/requirement.j2 +++ b/templates/registry/markdown/requirement.j2 @@ -1,9 +1,9 @@ -{% macro render(level, notes) -%} -{%- if level == "recommended" %}`Recommended` -{% elif level == "required" %}`Required` -{% elif level == "opt_in" %}`Opt-In` -{% elif level.conditionally_required %}`Conditionally Required`{{ notes.add_with_limit({"note": level.conditionally_required}) }} -{% elif level.recommended %}`Recommended`{{ notes.add_with_limit({"note": level.recommended}) }} +{% macro render(attr, notes) -%} +{%- if attr.level == "recommended" %}`Recommended` +{% elif attr.level == "required" %}`Required` +{% elif attr.level == "opt_in" %}`Opt-In` +{% elif attr.level.conditionally_required %}`Conditionally Required`{{ notes.add_with_limit({"note": attr.level.conditionally_required, "name": attr.name}) }} +{% elif attr.level.recommended %}`Recommended`{{ notes.add_with_limit({"note": attr.level.recommended, "name": attr.name}) }} {% else %}{{ level }} {%- endif %} {% endmacro %}