Skip to content

Commit

Permalink
[chore] Generate attr name on requirement level notes (open-telemetry…
Browse files Browse the repository at this point in the history
  • Loading branch information
joaopgrassi authored Nov 18, 2024
1 parent 2afe58c commit 4717a9f
Show file tree
Hide file tree
Showing 37 changed files with 136 additions and 136 deletions.
2 changes: 1 addition & 1 deletion docs/azure/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
Expand Down
12 changes: 6 additions & 6 deletions docs/database/cassandra.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -80,21 +80,21 @@ 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.
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.
Expand All @@ -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.<key>`](../../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.
Expand Down
16 changes: 8 additions & 8 deletions docs/database/cosmosdb.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand All @@ -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.<key>`](../../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.
Expand Down Expand Up @@ -363,21 +363,21 @@ 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.
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.

Expand Down Expand Up @@ -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.

Expand Down
4 changes: 2 additions & 2 deletions docs/database/couchdb.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ 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.
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.
Expand Down
Loading

0 comments on commit 4717a9f

Please sign in to comment.