From 49669266d979d925b1152885bd0be886929c7f22 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Mon, 8 Apr 2024 13:05:09 -0700 Subject: [PATCH] Update references from `db.operation` to `db.operation.name` (#904) --- docs/database/cosmosdb.md | 2 +- docs/database/database-spans.md | 4 ++-- docs/database/elasticsearch.md | 4 ++-- docs/database/mongodb.md | 6 +++--- docs/database/redis.md | 2 +- docs/database/sql.md | 26 ++++++++++++------------- model/trace/instrumentation/aws-sdk.yml | 2 +- 7 files changed, 23 insertions(+), 23 deletions(-) diff --git a/docs/database/cosmosdb.md b/docs/database/cosmosdb.md index 499d453db..f6a32606f 100644 --- a/docs/database/cosmosdb.md +++ b/docs/database/cosmosdb.md @@ -80,7 +80,7 @@ In addition to Cosmos DB attributes, all spans include | `az.namespace` | `"Microsoft.DocumentDB"` | | `db.system` | `"cosmosdb"` | | `db.name` | `"database name"` | -| `db.operation` | `"ReadItemsAsync"` | +| `db.operation.name` | `"ReadItemsAsync"` | | `server.address` | `"account.documents.azure.com"` | | `db.cosmosdb.client_id` | `3ba4827d-4422-483f-b59f-85b74211c11d` | | `db.cosmosdb.operation_type` | `Read` | diff --git a/docs/database/database-spans.md b/docs/database/database-spans.md index 937e8a577..3a758bf22 100644 --- a/docs/database/database-spans.md +++ b/docs/database/database-spans.md @@ -55,8 +55,8 @@ The **span name** SHOULD be set to a low cardinality value representing the stat It MAY be a stored procedure name (without arguments), DB statement without variable arguments, operation name, etc. Since SQL statements may have very high cardinality even without arguments, SQL spans SHOULD be named the following way, unless the statement is known to be of low cardinality: -` .`, provided that `db.operation` and `db.collection.name` are available. -If `db.collection.name` is not available due to its semantics, the span SHOULD be named ` `. +` .`, provided that `db.operation` and `db.collection.name` are available. +If `db.collection.name` is not available due to its semantics, the span SHOULD be named ` `. It is not recommended to attempt any client-side parsing of `db.statement` just to get these properties, they should only be used if the library being instrumented already provides them. When it's otherwise impossible to get any meaningful span name, `db.name` or the tech-specific database name MAY be used. diff --git a/docs/database/elasticsearch.md b/docs/database/elasticsearch.md index c04c894ca..1ef894e18 100644 --- a/docs/database/elasticsearch.md +++ b/docs/database/elasticsearch.md @@ -101,10 +101,10 @@ Tracing instrumentations that do so, MUST also set `http.request.method_original | `server.port` | `9200` | | `http.request.method` | `"GET"` | | `db.statement` | `"{\"query\":{\"term\":{\"user.id\":\"kimchy\"}}}"` | -| `db.operation` | `"search"` | +| `db.operation.name` | `"search"` | | `url.full` | `"https://elasticsearch.mydomain.com:9200/my-index-000001/_search?from=40&size=20"` | | `db.elasticsearch.path_parts.index` | `"my-index-000001"` | | `db.elasticsearch.cluster.name` | `"e9106fc68e3044f0b1475b04bf4ffd5f"` | -| `db.instance.id` | `"instance-0000000001"` | +| `db.instance.id` | `"instance-0000000001"` | [DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.31.0/specification/document-status.md diff --git a/docs/database/mongodb.md b/docs/database/mongodb.md index de02a0b6b..8f375ca88 100644 --- a/docs/database/mongodb.md +++ b/docs/database/mongodb.md @@ -29,8 +29,8 @@ described on this page. ## Example -| Key | Value | -| :---------------------- | :----------------------------------------------------------- | +| Key | Value | +|:------------------------| :----------------------------------------------------------- | | Span name | `"products.findAndModify"` | | `db.system` | `"mongodb"` | | `server.address` | `"mongodb0.example.com"` | @@ -40,7 +40,7 @@ described on this page. | `network.transport` | `"tcp"` | | `db.name` | `"shopDb"` | | `db.statement` | not set | -| `db.operation` | `"findAndModify"` | +| `db.operation.name` | `"findAndModify"` | | `db.mongodb.collection` | `"products"` | [DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.31.0/specification/document-status.md diff --git a/docs/database/redis.md b/docs/database/redis.md index 2011dc67e..6a8e94e05 100644 --- a/docs/database/redis.md +++ b/docs/database/redis.md @@ -42,7 +42,7 @@ Furthermore, `db.name` is not specified as there is no database name in Redis an | `network.transport` | `"unix"` | | `db.name` | not set | | `db.statement` | `"HMSET myhash field1 'Hello' field2 'World"` | -| `db.operation` | not set | +| `db.operation.name` | not set | | `db.redis.database_index` | `15` | [DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.31.0/specification/document-status.md diff --git a/docs/database/sql.md b/docs/database/sql.md index 60bf0b8cf..12d24d344 100644 --- a/docs/database/sql.md +++ b/docs/database/sql.md @@ -32,18 +32,18 @@ In the case of `EXEC`, this SHOULD be the stored procedure name that is being ex This is an example of attributes for a MySQL database span: -| Key | Value | -|:------------------------| :----------------------------------------------------------- | -| Span name | `"SELECT ShopDb.orders"` | -| `db.system` | `"mysql"` | -| `server.address` | `"shopdb.example.com"` | -| `server.port` | `3306` | -| `network.peer.address` | `"192.0.2.12"` | -| `network.peer.port` | `3306` | -| `network.transport` | `"tcp"` | -| `db.name` | `"ShopDb"` | -| `db.statement` | `"SELECT * FROM orders WHERE order_id = 'o4711'"` | -| `db.operation` | `"SELECT"` | -| `db.collection.name` | `"orders"` | +| Key | Value | +|:-----------------------| :----------------------------------------------------------- | +| Span name | `"SELECT ShopDb.orders"` | +| `db.system` | `"mysql"` | +| `server.address` | `"shopdb.example.com"` | +| `server.port` | `3306` | +| `network.peer.address` | `"192.0.2.12"` | +| `network.peer.port` | `3306` | +| `network.transport` | `"tcp"` | +| `db.name` | `"ShopDb"` | +| `db.statement` | `"SELECT * FROM orders WHERE order_id = 'o4711'"` | +| `db.operation.name` | `"SELECT"` | +| `db.collection.name` | `"orders"` | [DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.31.0/specification/document-status.md diff --git a/model/trace/instrumentation/aws-sdk.yml b/model/trace/instrumentation/aws-sdk.yml index 216f8d1f7..aac648e68 100644 --- a/model/trace/instrumentation/aws-sdk.yml +++ b/model/trace/instrumentation/aws-sdk.yml @@ -44,7 +44,7 @@ groups: type: span brief: "Attributes that exist for multiple DynamoDB request types." attributes: - - ref: db.operation + - ref: db.operation.name brief: "The same value as `rpc.method`." examples: - GetItem