Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database: mention metrics in system-specific docs #1779

Merged
merged 6 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Database: mention metrics in system-specific docs
  • Loading branch information
lmolkova committed Jan 21, 2025
commit 29e0cf7ce24f07b87c2695a2f39fd33854d9a153
22 changes: 20 additions & 2 deletions docs/database/cassandra.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,22 @@ linkTitle: Cassandra

**Status**: [Experimental][DocumentStatus]

The Semantic Conventions for [Cassandra](https://cassandra.apache.org/) extend and override the [Database Semantic Conventions](database-spans.md).
<!-- toc -->

- [Spans](#spans)
- [Metrics](#metrics)

<!-- tocstop -->

The Semantic Conventions for [Cassandra](https://cassandra.apache.org/) extend and override the [Database Semantic Conventions](README.md).

## Spans

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

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

## Attributes
The following table outlines the span attributes applicable to Cassandra.

<!-- semconv span.db.cassandra.client -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
Expand Down Expand Up @@ -144,4 +155,11 @@ and SHOULD be provided **at span creation time** (if provided at all):
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

## Metrics

Cassandra client instrumentations SHOULD collect metrics according to the general
[Semantic Conventions for Database Client Metrics](database-metrics.md).

`db.system` MUST be set to `"cassandra"`.

[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status
23 changes: 14 additions & 9 deletions docs/database/cosmosdb.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ linkTitle: Cosmos DB
<!-- toc -->

- [Semantic Conventions for Microsoft Azure Cosmos DB](#semantic-conventions-for-microsoft-azure-cosmos-db)
- [Attributes](#attributes)
- [Example](#example)
- [Operation Level Metrics](#operation-level-metrics)
- [Spans](#spans)
- [Example](#example)
- [Metrics](#metrics)
- [Metric: `db.client.operation.duration`](#metric-dbclientoperationduration)
- [Metric: `db.client.response.returned_rows`](#metric-dbclientresponsereturned_rows)
- [Metric: `db.client.cosmosdb.operation.request_charge`](#metric-dbclientcosmosdboperationrequest_charge)
Expand All @@ -22,13 +22,18 @@ linkTitle: Cosmos DB
**Status**: [Experimental][DocumentStatus]

The Semantic Conventions for [Microsoft Cosmos DB](https://azure.microsoft.com/products/cosmos-db/)
extend and override the [Database Semantic Conventions](database-spans.md).
extend and override the [Database Semantic Conventions](README.md).

## Attributes
## Spans

`db.system` MUST be set to `"cosmosdb"` and SHOULD be provided **at span creation time**.
Cosmos DB instrumentations include call-level spans that represent logical database
call and adhere to the general [Semantic Conventions for Database Client Spans](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.

Cosmos DB instrumentation includes call-level (public API) surface spans and network spans. Depending on the connection mode (Gateway or Direct), network-level spans may also be created.
The following table outlines the span attributes applicable to Cosmos DB.

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

<!-- semconv span.db.cosmosdb.client -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
Expand Down Expand Up @@ -271,7 +276,7 @@ and SHOULD be provided **at span creation time** (if provided at all):
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

## Example
### Example

| Key | Value |
|:-------------------------------------| :------------------- |
Expand All @@ -289,7 +294,7 @@ and SHOULD be provided **at span creation time** (if provided at all):
| `db.cosmosdb.sub_status_code` | `0` |
| `db.cosmosdb.request_charge` | `7.43` |

## Operation Level Metrics
## Metrics

The following metrics provide insights into Azure Cosmos DB client operation performance and behavior.

Expand Down
22 changes: 20 additions & 2 deletions docs/database/couchdb.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,22 @@ linkTitle: CouchDB

**Status**: [Experimental][DocumentStatus]

The Semantic Conventions for [CouchDB](https://couchdb.apache.org/) extend and override the [Database Semantic Conventions](database-spans.md).
<!-- toc -->

- [Spans](#spans)
- [Metrics](#metrics)

<!-- tocstop -->

The Semantic Conventions for [CouchDB](https://couchdb.apache.org/) extend and override the [Database Semantic Conventions](README.md).

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

## Attributes
## Spans

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

The following table outlines the span attributes applicable to CouchDB.

<!-- semconv span.db.couchdb.client -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
Expand Down Expand Up @@ -68,4 +79,11 @@ and SHOULD be provided **at span creation time** (if provided at all):
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

## Metrics

CouchDB client instrumentations SHOULD collect metrics according to the general
[Semantic Conventions for Database Client Metrics](database-metrics.md).

`db.system` MUST be set to `"couchdb"`.

[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status
4 changes: 2 additions & 2 deletions docs/database/database-spans.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
linkTitle: Client Calls
--->

# Semantic Conventions for Database Client Calls
# Semantic Conventions for Database Client Spans

**Status**: [Release Candidate][DocumentStatus], unless otherwise specified

Expand Down Expand Up @@ -96,7 +96,7 @@ classify as errors.

## Common attributes

These attributes will usually be the same for all operations performed over the same database connection.
These attributes are commonly used across different database systems.

<!-- semconv span.db.client -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
Expand Down
20 changes: 19 additions & 1 deletion docs/database/dynamodb.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,26 @@ linkTitle: AWS DynamoDB

**Status**: [Experimental][DocumentStatus]

<!-- toc -->

- [DynamoDB.BatchGetItem](#dynamodbbatchgetitem)
- [DynamoDB.BatchWriteItem](#dynamodbbatchwriteitem)
- [DynamoDB.CreateTable](#dynamodbcreatetable)
- [DynamoDB.DeleteItem](#dynamodbdeleteitem)
- [DynamoDB.DeleteTable](#dynamodbdeletetable)
- [DynamoDB.DescribeTable](#dynamodbdescribetable)
- [DynamoDB.GetItem](#dynamodbgetitem)
- [DynamoDB.ListTables](#dynamodblisttables)
- [DynamoDB.PutItem](#dynamodbputitem)
- [DynamoDB.Query](#dynamodbquery)
- [DynamoDB.Scan](#dynamodbscan)
- [DynamoDB.UpdateItem](#dynamodbupdateitem)
- [DynamoDB.UpdateTable](#dynamodbupdatetable)

<!-- 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](database-spans.md).
[AWS SDK Semantic Conventions](/docs/cloud-providers/aws-sdk.md) and [Database Semantic Conventions](README.md.md).

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

Expand Down
24 changes: 20 additions & 4 deletions docs/database/elasticsearch.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,24 @@ linkTitle: Elasticsearch

**Status**: [Experimental][DocumentStatus]

The Semantic Conventions for [Elasticsearch](https://www.elastic.co/) extend and override the [Database Semantic Conventions](database-spans.md).
<!-- toc -->

- [Spans](#spans)
- [Example](#example)
- [Metrics](#metrics)

<!-- tocstop -->

The Semantic Conventions for [Elasticsearch](https://www.elastic.co/) extend and override the [Database Semantic Conventions](README.md).

`db.system` MUST be set to `"elasticsearch"` and SHOULD be provided **at span creation time**.
## Spans

## Span Name
Spans representing calls to Elasticsearch adhere to the general [Semantic Conventions for Database Client Spans](database-spans.md).

The **span name** follows the [general database span name guidelines](database-spans.md#name) with the endpoint identifier stored in `db.operation.name`, and the index stored in `db.collection.name`.

## Attributes
The following table outlines the span attributes applicable to Elasticsearch.

<!-- semconv span.db.elasticsearch.client -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
Expand Down Expand Up @@ -150,7 +159,7 @@ and SHOULD be provided **at span creation time** (if provided at all):
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

## Example
### Example

| Key | Value |
|:------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------|
Expand All @@ -167,4 +176,11 @@ and SHOULD be provided **at span creation time** (if provided at all):
| `db.namespace` | `"my-cluster"` |
| `db.elasticsearch.node.name` | `"instance-0000000001"` |

## Metrics

Elasticsearch client instrumentations SHOULD collect metrics according to the general
[Semantic Conventions for Database Client Metrics](database-metrics.md).

`db.system` MUST be set to `"elasticsearch"`.

[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status
23 changes: 21 additions & 2 deletions docs/database/hbase.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,23 @@ linkTitle: HBase

**Status**: [Experimental][DocumentStatus]

The Semantic Conventions for [HBase](https://hbase.apache.org/) extend and override the [Database Semantic Conventions](database-spans.md).
<!-- toc -->

- [Spans](#spans)
- [Metrics](#metrics)

<!-- tocstop -->

The Semantic Conventions for [HBase](https://hbase.apache.org/) extend and override the [Database Semantic Conventions](README.md).

## Spans

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

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

## Attributes
The following table outlines the span attributes applicable to HBase.


<!-- semconv span.db.hbase.client -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
Expand Down Expand Up @@ -84,4 +96,11 @@ and SHOULD be provided **at span creation time** (if provided at all):
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

## Metrics

HBase client instrumentations SHOULD collect metrics according to the general
[Semantic Conventions for Database Client Metrics](database-metrics.md).

`db.system` MUST be set to `"hbase"`.

[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status
22 changes: 20 additions & 2 deletions docs/database/mariadb.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,22 @@ linkTitle: MariaDB

**Status**: [Release Candidate][DocumentStatus]

The Semantic Conventions for *MariaDB* extend and override the [Database Semantic Conventions](database-spans.md).
<!-- toc -->

- [Spans](#spans)
- [Metrics](#metrics)

<!-- tocstop -->

The Semantic Conventions for *MariaDB* extend and override the [Database Semantic Conventions](README.md).

## Spans

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

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

## Attributes
The following table outlines the span attributes applicable to MariaDB.

<!-- semconv span.db.mariadb.client -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
Expand Down Expand Up @@ -95,4 +106,11 @@ and SHOULD be provided **at span creation time** (if provided at all):
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

## Metrics

MariaDB client instrumentations SHOULD collect metrics according to the general
[Semantic Conventions for Database Client Metrics](database-metrics.md).

`db.system` MUST be set to `"mariadb"`.

[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status
26 changes: 24 additions & 2 deletions docs/database/mongodb.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,25 @@ linkTitle: MongoDB

**Status**: [Experimental][DocumentStatus]

The Semantic Conventions for [MongoDB](https://www.mongodb.com/) extend and override the [Database Semantic Conventions](database-spans.md).
<!-- toc -->

- [Spans](#spans)
- [Attributes](#attributes)
- [Example](#example)
- [Metrics](#metrics)

<!-- tocstop -->

The Semantic Conventions for [MongoDB](https://www.mongodb.com/) extend and override the [Database Semantic Conventions](README.md).

## Spans

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

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

The following table outlines the span attributes applicable to MongoDB.

## Attributes

<!-- semconv span.db.mongodb.client -->
Expand Down Expand Up @@ -78,7 +93,7 @@ and SHOULD be provided **at span creation time** (if provided at all):
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

## Example
### Example

| Key | Value |
|:------------------------| :----------------------------------------------------------- |
Expand All @@ -94,4 +109,11 @@ and SHOULD be provided **at span creation time** (if provided at all):
| `db.query.text` | not set |
| `db.operation.name` | `"findAndModify"` |

## Metrics

MongoDB client instrumentations SHOULD collect metrics according to the general
[Semantic Conventions for Database Client Metrics](database-metrics.md).

`db.system` MUST be set to `"mongodb"`.

[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status
22 changes: 20 additions & 2 deletions docs/database/mssql.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,22 @@ linkTitle: MSSQL

**Status**: [Release Candidate][DocumentStatus]

The Semantic Conventions for the *Microsoft SQL Server* extend and override the [Database Semantic Conventions](database-spans.md).
<!-- toc -->

- [Spans](#spans)
- [Metrics](#metrics)

<!-- tocstop -->

The Semantic Conventions for the *Microsoft SQL Server* extend and override the [Database Semantic Conventions](README.md).

## Spans

Spans representing calls to Microsoft SQL Server adhere to the general [Semantic Conventions for Database Client Spans](database-spans.md).

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

## Attributes
The following table outlines the span attributes applicable to Microsoft SQL Server.

<!-- semconv span.db.mssql.client -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
Expand Down Expand Up @@ -98,4 +109,11 @@ and SHOULD be provided **at span creation time** (if provided at all):
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

## Metrics

Microsoft SQL Server client instrumentations SHOULD collect metrics according to the general
[Semantic Conventions for Database Client Metrics](database-metrics.md).

`db.system` MUST be set to `"mssql"`.

[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status
Loading
Loading