Skip to content

Commit

Permalink
less changes
Browse files Browse the repository at this point in the history
  • Loading branch information
trask committed Nov 10, 2024
1 parent a0eb54c commit 70ed3de
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
18 changes: 16 additions & 2 deletions docs/attributes-registry/db.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,20 @@ This group defines attributes for Azure Cosmos DB.
| <a id="db-cosmosdb-request-charge" href="#db-cosmosdb-request-charge">`db.cosmosdb.request_charge`</a> | double | Request units consumed for the operation. | `46.18`; `1.0` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| <a id="db-cosmosdb-request-content-length" href="#db-cosmosdb-request-content-length">`db.cosmosdb.request_content_length`</a> | int | Request payload size in bytes. | | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| <a id="db-cosmosdb-sub-status-code" href="#db-cosmosdb-sub-status-code">`db.cosmosdb.sub_status_code`</a> | int | Cosmos DB sub status code. | `1000`; `1002` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| <a id="db-operation-name" href="#db-operation-name">`db.operation.name`</a> | string | The name of the operation or command being executed. [10] | `findAndModify`; `HMSET`; `SELECT` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

**[10]:** It is RECOMMENDED to capture the value as provided by the application
without attempting to do any case normalization.

The operation name SHOULD NOT be extracted from `db.query.text`,
unless the query format is known to only ever have a single operation name present.

For batch operations, if the individual operations are known to have the same operation name
then that operation name SHOULD be used prepended by `BATCH `,
otherwise `db.operation.name` SHOULD be `BATCH` or some other database
system specific term if more applicable.

This attribute has stability level RELEASE CANDIDATE.

`db.cosmosdb.connection_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.

Expand All @@ -216,9 +230,9 @@ This group defines attributes for Elasticsearch.
| Attribute | Type | Description | Examples | Stability |
|---|---|---|---|---|
| <a id="db-elasticsearch-node-name" href="#db-elasticsearch-node-name">`db.elasticsearch.node.name`</a> | string | Represents the human-readable identifier of the node/instance to which a request was routed. | `instance-0000000001` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| <a id="db-elasticsearch-path-parts" href="#db-elasticsearch-path-parts">`db.elasticsearch.path_parts.<key>`</a> | string | A dynamic value in the url path. [10] | `db.elasticsearch.path_parts.index=test-index`; `db.elasticsearch.path_parts.doc_id=123` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| <a id="db-elasticsearch-path-parts" href="#db-elasticsearch-path-parts">`db.elasticsearch.path_parts.<key>`</a> | string | A dynamic value in the url path. [11] | `db.elasticsearch.path_parts.index=test-index`; `db.elasticsearch.path_parts.doc_id=123` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

**[10]:** Many Elasticsearch url paths allow dynamic values. These SHOULD be recorded in span attributes in the format `db.elasticsearch.path_parts.<key>`, where `<key>` is the url path part name. The implementation SHOULD reference the [elasticsearch schema](https://raw.githubusercontent.com/elastic/elasticsearch-specification/main/output/schema/schema.json) in order to map the path part values to their names.
**[11]:** Many Elasticsearch url paths allow dynamic values. These SHOULD be recorded in span attributes in the format `db.elasticsearch.path_parts.<key>`, where `<key>` is the url path part name. The implementation SHOULD reference the [elasticsearch schema](https://raw.githubusercontent.com/elastic/elasticsearch-specification/main/output/schema/schema.json) in order to map the path part values to their names.

## Deprecated Database Attributes

Expand Down
6 changes: 6 additions & 0 deletions model/database/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ groups:
# - ref: db.system
# requirement_level:
# conditionally_required: if available
- ref: db.operation.name
requirement_level: # TODO (trask) simplify

Check warning on line 40 in model/database/common.yaml

View workflow job for this annotation

GitHub Actions / yamllint

[comments] too few spaces before comment
conditionally_required: >
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.
- ref: db.collection.name
brief: Cosmos DB container name.
requirement_level:
Expand Down

0 comments on commit 70ed3de

Please sign in to comment.