Skip to content

Commit c6dae4c

Browse files
author
Liudmila Molkova
committed
remove db.namespace from elastic
1 parent cd99310 commit c6dae4c

4 files changed

Lines changed: 30 additions & 26 deletions

File tree

docs/database/database-metrics.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ of `[ 0.001, 0.005, 0.01, 0.05, 0.1, 0.5, 1, 5, 10 ]`.
6666
| [`db.operation.name`](/docs/attributes-registry/db.md) | string | The name of the operation or command being executed. | `findAndModify`; `HMSET`; `SELECT` | `Conditionally Required` [4] | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
6767
| [`error.type`](/docs/attributes-registry/error.md) | string | Describes a class of error the operation ended with. [5] | `timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500` | `Conditionally Required` If and only if the operation failed. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
6868
| [`server.port`](/docs/attributes-registry/server.md) | int | Server port number. [6] | `80`; `8080`; `443` | `Conditionally Required` [7] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
69-
| [`db.instance.id`](/docs/attributes-registry/db.md) | string | Deprecated, no general replacement at this time. For Elasticsearch, use `db.elasticsearch.node.name` instead. | `mysql-e26b99z.example.com` | `Recommended` If different from the `server.address` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Deprecated, no general replacement at this time. For Elasticsearch, use `db.elasticsearch.node.name` instead. |
7069
| [`network.peer.address`](/docs/attributes-registry/network.md) | string | Peer address of the database node where the operation was performed. [8] | `10.1.2.80`; `/tmp/my.sock` | `Recommended` If applicable for this database system. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
7170
| [`network.peer.port`](/docs/attributes-registry/network.md) | int | Peer port number of the network connection. | `65123` | `Recommended` If and only if `network.peer.address` is set. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
7271
| [`server.address`](/docs/attributes-registry/server.md) | string | Name of the database host. [9] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |

docs/database/elasticsearch.md

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,12 @@ If the endpoint id is not available, the span name SHOULD be the `http.request.m
3030
| [`http.request.method`](/docs/attributes-registry/http.md) | string | HTTP request method. [2] | `GET`; `POST`; `HEAD` | `Required` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
3131
| [`url.full`](/docs/attributes-registry/url.md) | string | Absolute URL describing a network resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986) [3] | `https://localhost:9200/index/_search?q=user.id:kimchy` | `Required` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
3232
| [`db.elasticsearch.path_parts.<key>`](/docs/attributes-registry/db.md) | string | A dynamic value in the url path. [4] | `db.elasticsearch.path_parts.index=test-index`; `db.elasticsearch.path_parts.doc_id=123` | `Conditionally Required` when the url has dynamic values | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
33-
| [`db.namespace`](/docs/attributes-registry/db.md) | string | The name of the database, fully qualified within the server address and port. [5] | `customers`; `test.users` | `Conditionally Required` If available. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
34-
| [`error.type`](/docs/attributes-registry/error.md) | string | Describes a class of error the operation ended with. [6] | `timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500` | `Conditionally Required` If and only if the operation failed. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
35-
| [`server.port`](/docs/attributes-registry/server.md) | int | Server port number. [7] | `80`; `8080`; `443` | `Conditionally Required` [8] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
36-
| [`db.elasticsearch.cluster.name`](/docs/attributes-registry/db.md) | string | Represents the identifier of an Elasticsearch cluster. | `e9106fc68e3044f0b1475b04bf4ffd5f` | `Recommended` [9] | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
37-
| [`db.elasticsearch.node.name`](/docs/attributes-registry/db.md) | string | Represents the human-readable identifier of the node/instance to which a request was routed. | `instance-0000000001` | `Recommended` [10] | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
38-
| [`db.query.text`](/docs/attributes-registry/db.md) | string | The request body for a [search-type query](https://www.elastic.co/guide/en/elasticsearch/reference/current/search.html), as a json string. | `"{\"query\":{\"term\":{\"user.id\":\"kimchy\"}}}"` | `Recommended` [11] | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
39-
| [`server.address`](/docs/attributes-registry/server.md) | string | Name of the database host. [12] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
33+
| [`error.type`](/docs/attributes-registry/error.md) | string | Describes a class of error the operation ended with. [5] | `timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500` | `Conditionally Required` If and only if the operation failed. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
34+
| [`server.port`](/docs/attributes-registry/server.md) | int | Server port number. [6] | `80`; `8080`; `443` | `Conditionally Required` [7] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
35+
| [`db.elasticsearch.cluster.name`](/docs/attributes-registry/db.md) | string | Represents the identifier of an Elasticsearch cluster. | `e9106fc68e3044f0b1475b04bf4ffd5f` | `Recommended` [8] | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
36+
| [`db.elasticsearch.node.name`](/docs/attributes-registry/db.md) | string | Represents the human-readable identifier of the node/instance to which a request was routed. | `instance-0000000001` | `Recommended` [9] | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
37+
| [`db.query.text`](/docs/attributes-registry/db.md) | string | The request body for a [search-type query](https://www.elastic.co/guide/en/elasticsearch/reference/current/search.html), as a json string. | `"{\"query\":{\"term\":{\"user.id\":\"kimchy\"}}}"` | `Recommended` [10] | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
38+
| [`server.address`](/docs/attributes-registry/server.md) | string | Name of the database host. [11] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
4039

4140
**[1]:** This SHOULD be the endpoint identifier for the request.
4241

@@ -61,21 +60,19 @@ Tracing instrumentations that do so, MUST also set `http.request.method_original
6160

6261
**[4]:** 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.
6362

64-
**[5]:** <!-- TODO: overriding the base note, workaround for https://github.com/open-telemetry/build-tools/issues/299 -->
63+
**[5]:** The `error.type` SHOULD match the error code returned by the database or the client library, the canonical name of exception that occurred, or another low-cardinality error identifier. Instrumentations SHOULD document the list of errors they report.
6564

66-
**[6]:** The `error.type` SHOULD match the error code returned by the database or the client library, the canonical name of exception that occurred, or another low-cardinality error identifier. Instrumentations SHOULD document the list of errors they report.
65+
**[6]:** 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.
6766

68-
**[7]:** 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.
67+
**[7]:** If using a port other than the default port for this DBMS and if `server.address` is set.
6968

70-
**[8]:** If using a port other than the default port for this DBMS and if `server.address` is set.
69+
**[8]:** When communicating with an Elastic Cloud deployment, this should be collected from the "X-Found-Handling-Cluster" HTTP response header.
7170

72-
**[9]:** When communicating with an Elastic Cloud deployment, this should be collected from the "X-Found-Handling-Cluster" HTTP response header.
71+
**[9]:** When communicating with an Elastic Cloud deployment, this should be collected from the "X-Found-Handling-Instance" HTTP response header.
7372

74-
**[10]:** When communicating with an Elastic Cloud deployment, this should be collected from the "X-Found-Handling-Instance" HTTP response header.
73+
**[10]:** Should be collected by default for search-type queries and only if there is sanitization that excludes sensitive information.
7574

76-
**[11]:** Should be collected by default for search-type queries and only if there is sanitization that excludes sensitive information.
77-
78-
**[12]:** 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.
75+
**[11]:** 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.
7976

8077
`http.request.method` 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.
8178

model/db-common.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ groups:
33
type: attribute_group
44
brief: 'Database Client attributes'
55
attributes:
6-
- ref: db.namespace
7-
requirement_level:
8-
conditionally_required: If available.
96
- ref: db.operation.name
107
requirement_level:
118
conditionally_required: >
@@ -38,9 +35,6 @@ groups:
3835
- ref: db.system
3936
# TODO: Not adding to the minimal because of https://github.com/open-telemetry/build-tools/issues/192
4037
requirement_level: required
41-
- ref: db.instance.id
42-
requirement_level:
43-
recommended: If different from the `server.address`
4438
- ref: network.peer.address
4539
brief: Peer address of the database node where the operation was performed.
4640
requirement_level:
@@ -53,3 +47,6 @@ groups:
5347
- ref: network.peer.port
5448
requirement_level:
5549
recommended: If and only if `network.peer.address` is set.
50+
- ref: db.namespace
51+
requirement_level:
52+
conditionally_required: If available.

model/trace/database.yaml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ groups:
4949
- ref: db.system
5050
# TODO: Not adding to the minimal because of https://github.com/open-telemetry/build-tools/issues/192
5151
requirement_level: required
52+
- ref: db.namespace
53+
requirement_level:
54+
conditionally_required: If available.
55+
5256

5357
- id: db
5458
type: span
@@ -82,6 +86,8 @@ groups:
8286
brief: The Cassandra keyspace name.
8387
note: For commands that switch the keyspace, this SHOULD be set to the target keyspace (even if the command fails).
8488
examples: ["mykeyspace"]
89+
requirement_level:
90+
conditionally_required: If available.
8591
- ref: db.cassandra.page_size
8692
- ref: db.cassandra.consistency_level
8793
- ref: db.collection.name
@@ -139,6 +145,8 @@ groups:
139145
(literally, i.e., without replacing the placeholders with concrete values):
140146
[`GET /{db}/{docid}`](https://docs.couchdb.org/en/stable/api/document/common.html#get--db-docid).
141147
- ref: db.namespace
148+
requirement_level:
149+
conditionally_required: If available.
142150
note: >
143151
<!-- TODO: overriding the base note, workaround for https://github.com/open-telemetry/build-tools/issues/299 -->
144152
@@ -197,6 +205,8 @@ groups:
197205
requirement_level: required
198206
- ref: db.namespace
199207
brief: The MongoDB database name.
208+
requirement_level:
209+
conditionally_required: If available.
200210
note: >
201211
<!-- TODO: overriding the base note, workaround for https://github.com/open-telemetry/build-tools/issues/299 -->
202212
@@ -235,9 +245,6 @@ groups:
235245
- ref: db.elasticsearch.path_parts
236246
requirement_level:
237247
conditionally_required: when the url has dynamic values
238-
- ref: db.namespace
239-
note: >
240-
<!-- TODO: overriding the base note, workaround for https://github.com/open-telemetry/build-tools/issues/299 -->
241248

242249
- id: db.sql
243250
type: span
@@ -255,6 +262,8 @@ groups:
255262
brief: The name of the SQL table that the operation is acting upon.
256263
examples: ['users', 'dbo.products']
257264
- ref: db.namespace
265+
requirement_level:
266+
conditionally_required: If available.
258267
note: |
259268
If a database system has multiple namespace components, they SHOULD be concatenated
260269
(potentially using database system specific conventions) from most general to most
@@ -319,5 +328,7 @@ groups:
319328
requirement_level:
320329
conditionally_required: when available
321330
- ref: db.namespace
331+
requirement_level:
332+
conditionally_required: If available.
322333
note: >
323334
<!-- TODO: overriding the base note, workaround for https://github.com/open-telemetry/build-tools/issues/299 -->

0 commit comments

Comments
 (0)