Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@
/docs/non-normative/code-attrs-migration.md @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-code-attribute-approvers

# Database semantic conventions
/docs/database/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-db-approvers
/model/database/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-db-approvers
/docs/db/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-db-approvers
/model/db/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-db-approvers
/docs/non-normative/database-test-cases/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-db-approvers
/docs/non-normative/db-migration.md @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-db-approvers

Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Semantic Conventions are defined for the following areas:
* [CICD](cicd/README.md): Semantic Conventions for CICD systems.
* [Cloud Providers](cloud-providers/README.md): Semantic Conventions for cloud providers libraries.
* [CloudEvents](cloudevents/README.md): Semantic Conventions for the CloudEvents specification.
* [Database](database/README.md): Semantic Conventions for database operations.
* [Database](db/README.md): Semantic Conventions for database operations.
* [Exceptions](exceptions/README.md): Semantic Conventions for exceptions.
* [FaaS](faas/README.md): Semantic Conventions for Function as a Service (FaaS) operations.
* [Feature Flags](feature-flags/README.md): Semantic Conventions for feature flag evaluations.
Expand Down
2 changes: 1 addition & 1 deletion docs/cloud-providers/aws-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ interesting conventions are found.

The following Semantic Conventions extend the general AWS SDK attributes for specific AWS services:

- [AWS DynamoDB](/docs/database/dynamodb.md): Semantic Conventions for _AWS DynamoDB_.
- [AWS DynamoDB](/docs/db/dynamodb.md): Semantic Conventions for _AWS DynamoDB_.
- [AWS S3](/docs/object-stores/s3.md): Semantic Conventions for _AWS S3_.
- [AWS Bedrock](/docs/gen-ai/aws-bedrock.md): Semantic Conventions for _AWS Bedrock_.
- [AWS SNS](/docs/messaging/sns.md): Semantic Conventions for _AWS SNS_.
Expand Down
1 change: 1 addition & 0 deletions docs/database/README.md → docs/db/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<!--- Hugo front matter used to generate the website version of this page:
linkTitle: Database
aliases: [/docs/specs/semconv/database]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest that we drop this and every other aliases entry that was added via this PR (#3108), and replace it by a single wildcard redirect rule in this README.md file. I'll create a separate issue to track this.

--->

# Semantic conventions for database calls and systems
Expand Down
11 changes: 6 additions & 5 deletions docs/database/cassandra.md → docs/db/cassandra.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<!--- Hugo front matter used to generate the website version of this page:
linkTitle: Cassandra
aliases: [/docs/specs/semconv/database/cassandra.md]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, aliases are website paths, and so should not end with .md. /cc @vitorvasc

--->

# Semantic conventions for Cassandra client operations
Expand All @@ -26,11 +27,11 @@ The Semantic Conventions for [Cassandra](https://cassandra.apache.org/) extend a

**Status:** ![Development](https://img.shields.io/badge/-development-blue)

Spans representing calls to a Cassandra database adhere to the general [Semantic Conventions for Database Client Spans](/docs/database/database-spans.md).
Spans representing calls to a Cassandra database adhere to the general [Semantic Conventions for Database Client Spans](/docs/db/database-spans.md).

`db.system.name` MUST be set to `"cassandra"` and SHOULD be provided **at span creation time**.

**Span name** SHOULD follow the general [database span name convention](/docs/database/database-spans.md#name)
**Span name** SHOULD follow the general [database span name convention](/docs/db/database-spans.md#name)

**Span kind** SHOULD be `CLIENT`.

Expand Down Expand Up @@ -113,13 +114,13 @@ 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-query)
[Generating query summary](/docs/db/database-spans.md#generating-a-summary-of-the-query)
section.

**[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).
**[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/db/database-spans.md#sanitization-of-dbquerytext).
Parameterized query text SHOULD be collected by default (the query parameter values themselves are opt-in, see [`db.query.parameter.<key>`](/docs/registry/attributes/db.md)).

**[15] `db.query.text`:** For sanitization see [Sanitization of `db.query.text`](/docs/database/database-spans.md#sanitization-of-dbquerytext).
**[15] `db.query.text`:** For sanitization see [Sanitization of `db.query.text`](/docs/db/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.
Parameterized query text SHOULD NOT be sanitized. 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.

Expand Down
11 changes: 6 additions & 5 deletions docs/database/cosmosdb.md → docs/db/cosmosdb.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<!--- Hugo front matter used to generate the website version of this page:
linkTitle: Cosmos DB
aliases: [/docs/specs/semconv/database/cosmosdb.md]
--->

# Semantic conventions for Microsoft Azure Cosmos DB client operations
Expand Down Expand Up @@ -32,14 +33,14 @@ extend and override the [Database Semantic Conventions](README.md).

**Status:** ![Development](https://img.shields.io/badge/-development-blue)

Cosmos DB instrumentations include call-level spans that represent logical database calls and adhere to the general [Semantic Conventions for Database Client Spans](/docs/database/database-spans.md).
Cosmos DB instrumentations include call-level spans that represent logical database calls and adhere to the general [Semantic Conventions for Database Client Spans](/docs/db/database-spans.md).

Additional spans representing network calls may also be created depending on the connection mode (Gateway or Direct).
Semantic conventions described in this document apply to the call-level spans only.

`db.system.name` MUST be set to `"azure.cosmosdb"` and SHOULD be provided **at span creation time**.

**Span name** SHOULD follow the general [database span name convention](/docs/database/database-spans.md#name)
**Span name** SHOULD follow the general [database span name convention](/docs/db/database-spans.md#name)

**Span kind** SHOULD be `CLIENT`.

Expand Down Expand Up @@ -213,7 +214,7 @@ Instrumentations SHOULD document how `error.type` is populated.

**[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`.

**[10] `db.query.text`:** For sanitization see [Sanitization of `db.query.text`](/docs/database/database-spans.md#sanitization-of-dbquerytext).
**[10] `db.query.text`:** For sanitization see [Sanitization of `db.query.text`](/docs/db/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.
Parameterized query text SHOULD NOT be sanitized. 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.

Expand Down Expand Up @@ -319,15 +320,15 @@ The following metrics provide insights into Azure Cosmos DB client operation per

This metric is [required][MetricRequired].

It captures the total time taken by an Azure Cosmos DB operation. This metric follows the common [db.client.operation.duration](/docs/database/database-metrics.md#metric-dbclientoperationduration) definition.
It captures the total time taken by an Azure Cosmos DB operation. This metric follows the common [db.client.operation.duration](/docs/db/database-metrics.md#metric-dbclientoperationduration) definition.

Refer [azure.cosmosdb.client.operation.request_charge](#metric-azurecosmosdbclientoperationrequest_charge) metrics for dimensions.

### Metric: `db.client.response.returned_rows`

This metric is [required][MetricRequired].

It captures the number of items returned by a query or feed operation in Azure Cosmos DB. It helps identify response sizes that may contribute to high latency, increased memory/CPU usage, or network call failures. This metric follows the common [`db.client.response.returned_rows`](/docs/database/database-metrics.md#metric-dbclientresponsereturned_rows) definition.
It captures the number of items returned by a query or feed operation in Azure Cosmos DB. It helps identify response sizes that may contribute to high latency, increased memory/CPU usage, or network call failures. This metric follows the common [`db.client.response.returned_rows`](/docs/db/database-metrics.md#metric-dbclientresponsereturned_rows) definition.

Refer [azure.cosmosdb.client.operation.request_charge](#metric-azurecosmosdbclientoperationrequest_charge) metrics for dimensions.

Expand Down
5 changes: 3 additions & 2 deletions docs/database/couchdb.md → docs/db/couchdb.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<!--- Hugo front matter used to generate the website version of this page:
linkTitle: CouchDB
aliases: [/docs/specs/semconv/database/couchdb.md]
--->

# Semantic conventions for CouchDB client operations
Expand Down Expand Up @@ -32,11 +33,11 @@ The following table outlines the span attributes applicable to CouchDB.

**Status:** ![Development](https://img.shields.io/badge/-development-blue)

Spans representing calls to CouchDB adhere to the general [Semantic Conventions for Database Client Spans](/docs/database/database-spans.md).
Spans representing calls to CouchDB adhere to the general [Semantic Conventions for Database Client Spans](/docs/db/database-spans.md).

`db.system.name` MUST be set to `"couchdb"` and SHOULD be provided **at span creation time**.

**Span name** SHOULD follow the general [database span name convention](/docs/database/database-spans.md#name)
**Span name** SHOULD follow the general [database span name convention](/docs/db/database-spans.md#name)

**Span kind** SHOULD be `CLIENT`.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<!--- Hugo front matter used to generate the website version of this page:
linkTitle: Metrics
aliases: [/docs/specs/semconv/database/database-metrics.md]
--->

# Semantic conventions for database client metrics
Expand Down Expand Up @@ -154,7 +155,7 @@ 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-query)
[Generating query summary](/docs/db/database-spans.md#generating-a-summary-of-the-query)
section.

**[14] `db.stored_procedure.name`:** If operation applies to a specific stored procedure.
Expand All @@ -170,7 +171,7 @@ If a database operation involved multiple network calls (for example retries), t

**[17] `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.

**[18] `db.query.text`:** For sanitization see [Sanitization of `db.query.text`](/docs/database/database-spans.md#sanitization-of-dbquerytext).
**[18] `db.query.text`:** For sanitization see [Sanitization of `db.query.text`](/docs/db/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.
Parameterized query text SHOULD NOT be sanitized. 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.

Expand Down Expand Up @@ -343,15 +344,15 @@ 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-query)
[Generating query summary](/docs/db/database-spans.md#generating-a-summary-of-the-query)
section.

**[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.

**[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.

**[16] `db.query.text`:** For sanitization see [Sanitization of `db.query.text`](/docs/database/database-spans.md#sanitization-of-dbquerytext).
**[16] `db.query.text`:** For sanitization see [Sanitization of `db.query.text`](/docs/db/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.
Parameterized query text SHOULD NOT be sanitized. 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.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<!--- Hugo front matter used to generate the website version of this page:
linkTitle: Spans
aliases: [/docs/specs/semconv/database/database-spans.md]
--->

# Semantic conventions for database client spans
Expand Down Expand Up @@ -98,7 +99,7 @@ it is RECOMMENDED to instrument the higher-level convenience APIs.
These often allow setting `db.operation.*` attributes, which usually are not
readily available at the generic query level.

**Span name** is covered in the [Name](/docs/database/database-spans.md#name) section.
**Span name** is covered in the [Name](/docs/db/database-spans.md#name) section.

**Span kind** SHOULD be `CLIENT`. It MAY be set to `INTERNAL` on spans representing
in-memory database calls.
Expand Down Expand Up @@ -190,13 +191,13 @@ 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-query)
[Generating query summary](/docs/db/database-spans.md#generating-a-summary-of-the-query)
section.

**[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).
**[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/db/database-spans.md#sanitization-of-dbquerytext).
Parameterized query text SHOULD be collected by default (the query parameter values themselves are opt-in, see [`db.query.parameter.<key>`](/docs/registry/attributes/db.md)).

**[16] `db.query.text`:** For sanitization see [Sanitization of `db.query.text`](/docs/database/database-spans.md#sanitization-of-dbquerytext).
**[16] `db.query.text`:** For sanitization see [Sanitization of `db.query.text`](/docs/db/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.
Parameterized query text SHOULD NOT be sanitized. 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.

Expand Down
3 changes: 2 additions & 1 deletion docs/database/dynamodb.md → docs/db/dynamodb.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<!--- Hugo front matter used to generate the website version of this page:
linkTitle: DynamoDB
aliases: [/docs/specs/semconv/database/dynamodb.md]
--->

# Semantic conventions for AWS DynamoDB client operations
Expand Down Expand Up @@ -27,7 +28,7 @@ linkTitle: DynamoDB
<!-- tocstop -->

The Semantic Conventions for [AWS DynamoDB](https://aws.amazon.com/dynamodb/) extend and override the general
[AWS SDK Semantic Conventions](/docs/cloud-providers/aws-sdk.md) and [Database Semantic Conventions](/docs/database/README.md).
[AWS SDK Semantic Conventions](/docs/cloud-providers/aws-sdk.md) and [Database Semantic Conventions](/docs/db/README.md).

## Spans

Expand Down
Loading
Loading