From 151efe5196ce664185fc25a90c881fc64bc53882 Mon Sep 17 00:00:00 2001 From: Steve Gordon Date: Fri, 25 Aug 2023 15:56:30 +0100 Subject: [PATCH 1/9] Add two additional attributes and align with other dbs --- docs/database/elasticsearch.md | 46 ++++++++++++++++++++++------------ model/trace/database.yaml | 23 +++++++++++++++++ 2 files changed, 53 insertions(+), 16 deletions(-) diff --git a/docs/database/elasticsearch.md b/docs/database/elasticsearch.md index ae329f7e5e..cda804ac94 100644 --- a/docs/database/elasticsearch.md +++ b/docs/database/elasticsearch.md @@ -6,7 +6,11 @@ linkTitle: Elasticsearch **Status**: [Experimental][DocumentStatus] -This document defines semantic conventions to apply when creating a span for requests to Elasticsearch. +The Semantic Conventions for [Elasticsearch](https://www.elastic.co/) extend and override the [Database Semantic Conventions](database-spans.md) +that describe common database operations attributes in addition to the Semantic Conventions +described on this page. + +`db.system` MUST be set to `"elasticsearch"`. ## Span Name @@ -30,25 +34,33 @@ in order to map the path part values to their names. **[1]:** when the url has dynamic values -## Span attributes - -`db.system` MUST be set to `"elasticsearch"`. +## Call-level attributes | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| -| [`db.operation`](database-spans.md) | string | The endpoint identifier for the request. [1] | `search`; `ml.close_job`; `cat.aliases` | Required | -| [`db.statement`](database-spans.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: [2] | -| `http.request.method` | string | HTTP request method. [3] | `GET`; `POST`; `HEAD` | Required | -| [`server.address`](../general/attributes.md) | string | Server address - domain name if available without reverse DNS lookup, otherwise IP address or Unix domain socket name. [4] | `example.com` | See below | -| [`server.port`](../general/attributes.md) | int | Server port number [5] | `80`; `8080`; `443` | Recommended | -| [`url.full`](../url/url.md) | string | Absolute URL describing a network resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986) [6] | `https://localhost:9200/index/_search?q=user.id:kimchy` | Required | +| `db.elasticsearch.cluster_name` | string | Represents the identifier of an Elasticsearch cluster. [1] | `e9106fc68e3044f0b1475b04bf4ffd5f` | Recommended: [2] | +| `db.elasticsearch.cluster_instance` | string | Represents the identifier of the node/instance to which the request was routed. [3] | `instance-0000000001` | Recommended: [4] | +| [`db.operation`](database-spans.md) | string | The endpoint identifier for the request. [5] | `search`; `ml.close_job`; `cat.aliases` | Required | +| [`db.statement`](database-spans.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: [6] | +| `http.request.method` | string | HTTP request method. [7] | `GET`; `POST`; `HEAD` | Required | +| [`server.address`](../general/attributes.md) | string | Server address - domain name if available without reverse DNS lookup, otherwise IP address or Unix domain socket name. [8] | `example.com` | See below | +| [`server.port`](../general/attributes.md) | int | Server port number [9] | `80`; `8080`; `443` | Recommended | +| [`url.full`](../url/url.md) | string | Absolute URL describing a network resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986) [10] | `https://localhost:9200/index/_search?q=user.id:kimchy` | Required | + +**[1]:** For Elastic Cloud hosted deployents the "X-Found-Handling-Cluster" HTTP response header contains the cluster ID. + +**[2]:** Should be collected from the relevant HTTP response header if available. + +**[3]:** For Elastic Cloud hosted deployents "X-Found-Handling-Instance" HTTP response header contains the instance identifier. + +**[4]:** Should be collected from the relevant HTTP response header if available. -**[1]:** When setting this to an SQL keyword, it is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if the operation name is provided by the library being instrumented. If the SQL statement has an ambiguous operation, or performs more than one operation, this value may be omitted. +**[5]:** When setting this to an SQL keyword, it is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if the operation name is provided by the library being instrumented. If the SQL statement has an ambiguous operation, or performs more than one operation, this value may be omitted. -**[2]:** Should be collected by default for search-type queries and only if there is sanitization that excludes sensitive information. +**[6]:** Should be collected by default for search-type queries and only if there is sanitization that excludes sensitive information. -**[3]:** HTTP request method value SHOULD be "known" to the instrumentation. +**[7]:** HTTP request method value SHOULD be "known" to the instrumentation. By default, this convention defines "known" methods as the ones listed in [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-methods) and the PATCH method defined in [RFC5789](https://www.rfc-editor.org/rfc/rfc5789.html). @@ -63,12 +75,12 @@ HTTP method names are case-sensitive and `http.request.method` attribute value M Instrumentations for specific web frameworks that consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent. Tracing instrumentations that do so, MUST also set `http.request.method_original` to the original value. -**[4]:** When observed from the client side, and when communicating through an intermediary, `server.address` SHOULD represent +**[8]:** When observed from the client side, and when communicating through an intermediary, `server.address` SHOULD represent the server address behind any intermediaries (e.g. proxies) if it's available. -**[5]:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries (e.g. proxies) if it's available. +**[9]:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries (e.g. proxies) if it's available. -**[6]:** For network calls, URL usually has `scheme://host[:port][path][?query][#fragment]` format, where the fragment is not transmitted over HTTP, but if it is known, it should be included nevertheless. +**[10]:** For network calls, URL usually has `scheme://host[:port][path][?query][#fragment]` format, where the fragment is not transmitted over HTTP, but if it is known, it should be included nevertheless. `url.full` MUST NOT contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case username and password should be redacted and attribute's value should be `https://REDACTED:REDACTED@www.example.com/`. `url.full` SHOULD capture the absolute URL when it is available (or can be reconstructed) and SHOULD NOT be validated or modified except for sanitizing purposes. @@ -86,5 +98,7 @@ the server address behind any intermediaries (e.g. proxies) if it's available. | `db.operation` | `"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.elasticsearch.cluster_instance` | `"instance-0000000001"` | [DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.22.0/specification/document-status.md diff --git a/model/trace/database.yaml b/model/trace/database.yaml index 73f6005d08..161acbda38 100644 --- a/model/trace/database.yaml +++ b/model/trace/database.yaml @@ -413,6 +413,7 @@ groups: note: > For **Redis**, the value provided for `db.statement` SHOULD correspond to the syntax of the Redis CLI. If, for example, the [`HMSET` command](https://redis.io/commands/hmset) is invoked, `"HMSET myhash field1 'Hello' field2 'World'"` would be a suitable value for `db.statement`. + - id: db.mongodb prefix: db.mongodb type: span @@ -453,6 +454,28 @@ groups: examples: [ '"{\"query\":{\"term\":{\"user.id\":\"kimchy\"}}}"' ] - ref: server.address - ref: server.port + - id: cluster_name + type: string + requirement_level: + recommended: > + Should be collected from the relevant HTTP response header if available. + tag: call-level-tech-specific + brief: > + Represents the identifier of an Elasticsearch cluster. + examples: ["e9106fc68e3044f0b1475b04bf4ffd5f"] + note: > + For Elastic Cloud hosted deployents the "X-Found-Handling-Cluster" HTTP response header contains the cluster ID. + - id: cluster_instance + type: string + requirement_level: + recommended: > + Should be collected from the relevant HTTP response header if available. + tag: call-level-tech-specific + brief: > + Represents the identifier of the node/instance to which the request was routed. + examples: ["instance-0000000001"] + note: > + For Elastic Cloud hosted deployents "X-Found-Handling-Instance" HTTP response header contains the instance identifier. - id: db.sql prefix: 'db.sql' From 072267be8cfafc126b9c9e30ccbc9fcbb6094b0b Mon Sep 17 00:00:00 2001 From: Steve Gordon Date: Fri, 25 Aug 2023 15:58:39 +0100 Subject: [PATCH 2/9] Update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6faafa19c4..4322dcaf3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ release. ## Unreleased +- Add two additional attributes to Elasticsearch semantic conventions. + ([#285](https://github.com/open-telemetry/semantic-conventions/pull/285)) - Fix the unit of metric.process.runtime.jvm.system.cpu.load_1m to be {run_queue_item} ([#95](https://github.com/open-telemetry/semantic-conventions/pull/95)) - Update `.count` metric naming convention so that it only applies to UpDownCounters, From b287175caf8f38fed0db696fedb84d21ed4f9d29 Mon Sep 17 00:00:00 2001 From: Steve Gordon Date: Tue, 29 Aug 2023 08:44:13 +0100 Subject: [PATCH 3/9] Update CHANGELOG.md Co-authored-by: Joao Grassi --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4322dcaf3b..9fc4019f09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ release. ## Unreleased -- Add two additional attributes to Elasticsearch semantic conventions. +- Add `cluster_name` and `cluster_instance` attributes to Elasticsearch semantic conventions. ([#285](https://github.com/open-telemetry/semantic-conventions/pull/285)) - Fix the unit of metric.process.runtime.jvm.system.cpu.load_1m to be {run_queue_item} ([#95](https://github.com/open-telemetry/semantic-conventions/pull/95)) From e607302cc050262b5ed5f23262a9f28a6b305dcf Mon Sep 17 00:00:00 2001 From: Steve Gordon Date: Tue, 29 Aug 2023 09:10:20 +0100 Subject: [PATCH 4/9] Fix YAML trailing spaces --- model/trace/database.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/trace/database.yaml b/model/trace/database.yaml index 161acbda38..b0e5434fdb 100644 --- a/model/trace/database.yaml +++ b/model/trace/database.yaml @@ -413,7 +413,7 @@ groups: note: > For **Redis**, the value provided for `db.statement` SHOULD correspond to the syntax of the Redis CLI. If, for example, the [`HMSET` command](https://redis.io/commands/hmset) is invoked, `"HMSET myhash field1 'Hello' field2 'World'"` would be a suitable value for `db.statement`. - + - id: db.mongodb prefix: db.mongodb type: span From 515e266123d1bdc7f081181ed31bb2cf4e988f39 Mon Sep 17 00:00:00 2001 From: Steve Gordon Date: Tue, 29 Aug 2023 09:12:51 +0100 Subject: [PATCH 5/9] Prefer namespaced attributes --- docs/database/elasticsearch.md | 4 ++-- model/trace/database.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/database/elasticsearch.md b/docs/database/elasticsearch.md index cda804ac94..80930ff39b 100644 --- a/docs/database/elasticsearch.md +++ b/docs/database/elasticsearch.md @@ -39,8 +39,8 @@ in order to map the path part values to their names. | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| -| `db.elasticsearch.cluster_name` | string | Represents the identifier of an Elasticsearch cluster. [1] | `e9106fc68e3044f0b1475b04bf4ffd5f` | Recommended: [2] | -| `db.elasticsearch.cluster_instance` | string | Represents the identifier of the node/instance to which the request was routed. [3] | `instance-0000000001` | Recommended: [4] | +| `db.elasticsearch.cluster.name` | string | Represents the identifier of an Elasticsearch cluster. [1] | `e9106fc68e3044f0b1475b04bf4ffd5f` | Recommended: [2] | +| `db.elasticsearch.cluster.instance` | string | Represents the identifier of the node/instance to which the request was routed. [3] | `instance-0000000001` | Recommended: [4] | | [`db.operation`](database-spans.md) | string | The endpoint identifier for the request. [5] | `search`; `ml.close_job`; `cat.aliases` | Required | | [`db.statement`](database-spans.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: [6] | | `http.request.method` | string | HTTP request method. [7] | `GET`; `POST`; `HEAD` | Required | diff --git a/model/trace/database.yaml b/model/trace/database.yaml index b0e5434fdb..4c7da6ef26 100644 --- a/model/trace/database.yaml +++ b/model/trace/database.yaml @@ -454,7 +454,7 @@ groups: examples: [ '"{\"query\":{\"term\":{\"user.id\":\"kimchy\"}}}"' ] - ref: server.address - ref: server.port - - id: cluster_name + - id: cluster.name type: string requirement_level: recommended: > @@ -465,7 +465,7 @@ groups: examples: ["e9106fc68e3044f0b1475b04bf4ffd5f"] note: > For Elastic Cloud hosted deployents the "X-Found-Handling-Cluster" HTTP response header contains the cluster ID. - - id: cluster_instance + - id: cluster.instance type: string requirement_level: recommended: > From 5a667c1b56496eb32127122a000e1aa6fed70046 Mon Sep 17 00:00:00 2001 From: Steve Gordon Date: Tue, 29 Aug 2023 13:20:47 +0100 Subject: [PATCH 6/9] Update CHANGELOG.md Co-authored-by: Joao Grassi --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fc4019f09..4a343cb308 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ release. ## Unreleased -- Add `cluster_name` and `cluster_instance` attributes to Elasticsearch semantic conventions. +- Add `cluster.name` and `cluster.instance` attributes to Elasticsearch semantic conventions. ([#285](https://github.com/open-telemetry/semantic-conventions/pull/285)) - Fix the unit of metric.process.runtime.jvm.system.cpu.load_1m to be {run_queue_item} ([#95](https://github.com/open-telemetry/semantic-conventions/pull/95)) From dc2bfbd9d1304afe17587a44e5761920bb433890 Mon Sep 17 00:00:00 2001 From: Steve Gordon Date: Tue, 29 Aug 2023 13:22:52 +0100 Subject: [PATCH 7/9] Update recommendation applicablility to cloud --- docs/database/elasticsearch.md | 36 +++++++++++++++------------------- model/trace/database.yaml | 8 ++------ 2 files changed, 18 insertions(+), 26 deletions(-) diff --git a/docs/database/elasticsearch.md b/docs/database/elasticsearch.md index 80930ff39b..dd9febe4b1 100644 --- a/docs/database/elasticsearch.md +++ b/docs/database/elasticsearch.md @@ -39,28 +39,24 @@ in order to map the path part values to their names. | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| -| `db.elasticsearch.cluster.name` | string | Represents the identifier of an Elasticsearch cluster. [1] | `e9106fc68e3044f0b1475b04bf4ffd5f` | Recommended: [2] | -| `db.elasticsearch.cluster.instance` | string | Represents the identifier of the node/instance to which the request was routed. [3] | `instance-0000000001` | Recommended: [4] | -| [`db.operation`](database-spans.md) | string | The endpoint identifier for the request. [5] | `search`; `ml.close_job`; `cat.aliases` | Required | -| [`db.statement`](database-spans.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: [6] | -| `http.request.method` | string | HTTP request method. [7] | `GET`; `POST`; `HEAD` | Required | -| [`server.address`](../general/attributes.md) | string | Server address - domain name if available without reverse DNS lookup, otherwise IP address or Unix domain socket name. [8] | `example.com` | See below | -| [`server.port`](../general/attributes.md) | int | Server port number [9] | `80`; `8080`; `443` | Recommended | -| [`url.full`](../url/url.md) | string | Absolute URL describing a network resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986) [10] | `https://localhost:9200/index/_search?q=user.id:kimchy` | Required | +| `db.elasticsearch.cluster.name` | string | Represents the identifier of an Elasticsearch cluster. | `e9106fc68e3044f0b1475b04bf4ffd5f` | Recommended: [1] | +| `db.elasticsearch.cluster.instance` | string | Represents the identifier of the node/instance to which the request was routed. | `instance-0000000001` | Recommended: [2] | +| [`db.operation`](database-spans.md) | string | The endpoint identifier for the request. [3] | `search`; `ml.close_job`; `cat.aliases` | Required | +| [`db.statement`](database-spans.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: [4] | +| `http.request.method` | string | HTTP request method. [5] | `GET`; `POST`; `HEAD` | Required | +| [`server.address`](../general/attributes.md) | string | Server address - domain name if available without reverse DNS lookup, otherwise IP address or Unix domain socket name. [6] | `example.com` | See below | +| [`server.port`](../general/attributes.md) | int | Server port number [7] | `80`; `8080`; `443` | Recommended | +| [`url.full`](../url/url.md) | string | Absolute URL describing a network resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986) [8] | `https://localhost:9200/index/_search?q=user.id:kimchy` | Required | -**[1]:** For Elastic Cloud hosted deployents the "X-Found-Handling-Cluster" HTTP response header contains the cluster ID. +**[1]:** When communicating with an Elastic Cloud deployment, this should be collected from the "X-Found-Handling-Cluster" HTTP response header. -**[2]:** Should be collected from the relevant HTTP response header if available. +**[2]:** When communicating with an Elastic Cloud deployment, this should be collected from the "X-Found-Handling-Instance" HTTP response header. -**[3]:** For Elastic Cloud hosted deployents "X-Found-Handling-Instance" HTTP response header contains the instance identifier. +**[3]:** When setting this to an SQL keyword, it is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if the operation name is provided by the library being instrumented. If the SQL statement has an ambiguous operation, or performs more than one operation, this value may be omitted. -**[4]:** Should be collected from the relevant HTTP response header if available. +**[4]:** Should be collected by default for search-type queries and only if there is sanitization that excludes sensitive information. -**[5]:** When setting this to an SQL keyword, it is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if the operation name is provided by the library being instrumented. If the SQL statement has an ambiguous operation, or performs more than one operation, this value may be omitted. - -**[6]:** Should be collected by default for search-type queries and only if there is sanitization that excludes sensitive information. - -**[7]:** HTTP request method value SHOULD be "known" to the instrumentation. +**[5]:** HTTP request method value SHOULD be "known" to the instrumentation. By default, this convention defines "known" methods as the ones listed in [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-methods) and the PATCH method defined in [RFC5789](https://www.rfc-editor.org/rfc/rfc5789.html). @@ -75,12 +71,12 @@ HTTP method names are case-sensitive and `http.request.method` attribute value M Instrumentations for specific web frameworks that consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent. Tracing instrumentations that do so, MUST also set `http.request.method_original` to the original value. -**[8]:** When observed from the client side, and when communicating through an intermediary, `server.address` SHOULD represent +**[6]:** When observed from the client side, and when communicating through an intermediary, `server.address` SHOULD represent the server address behind any intermediaries (e.g. proxies) if it's available. -**[9]:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries (e.g. proxies) if it's available. +**[7]:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries (e.g. proxies) if it's available. -**[10]:** For network calls, URL usually has `scheme://host[:port][path][?query][#fragment]` format, where the fragment is not transmitted over HTTP, but if it is known, it should be included nevertheless. +**[8]:** For network calls, URL usually has `scheme://host[:port][path][?query][#fragment]` format, where the fragment is not transmitted over HTTP, but if it is known, it should be included nevertheless. `url.full` MUST NOT contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case username and password should be redacted and attribute's value should be `https://REDACTED:REDACTED@www.example.com/`. `url.full` SHOULD capture the absolute URL when it is available (or can be reconstructed) and SHOULD NOT be validated or modified except for sanitizing purposes. diff --git a/model/trace/database.yaml b/model/trace/database.yaml index 4c7da6ef26..f0e529bbd8 100644 --- a/model/trace/database.yaml +++ b/model/trace/database.yaml @@ -458,24 +458,20 @@ groups: type: string requirement_level: recommended: > - Should be collected from the relevant HTTP response header if available. + When communicating with an Elastic Cloud deployment, this should be collected from the "X-Found-Handling-Cluster" HTTP response header. tag: call-level-tech-specific brief: > Represents the identifier of an Elasticsearch cluster. examples: ["e9106fc68e3044f0b1475b04bf4ffd5f"] - note: > - For Elastic Cloud hosted deployents the "X-Found-Handling-Cluster" HTTP response header contains the cluster ID. - id: cluster.instance type: string requirement_level: recommended: > - Should be collected from the relevant HTTP response header if available. + When communicating with an Elastic Cloud deployment, this should be collected from the "X-Found-Handling-Instance" HTTP response header. tag: call-level-tech-specific brief: > Represents the identifier of the node/instance to which the request was routed. examples: ["instance-0000000001"] - note: > - For Elastic Cloud hosted deployents "X-Found-Handling-Instance" HTTP response header contains the instance identifier. - id: db.sql prefix: 'db.sql' From 6441928957c6df47bcb6581e0b2844fdaba145aa Mon Sep 17 00:00:00 2001 From: Steve Gordon Date: Tue, 29 Aug 2023 14:11:59 +0100 Subject: [PATCH 8/9] Update attribute name --- CHANGELOG.md | 2 +- docs/database/elasticsearch.md | 2 +- model/trace/database.yaml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a343cb308..9981ea62ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ release. ## Unreleased -- Add `cluster.name` and `cluster.instance` attributes to Elasticsearch semantic conventions. +- Add `cluster.name` and `node.name` attributes to Elasticsearch semantic conventions. ([#285](https://github.com/open-telemetry/semantic-conventions/pull/285)) - Fix the unit of metric.process.runtime.jvm.system.cpu.load_1m to be {run_queue_item} ([#95](https://github.com/open-telemetry/semantic-conventions/pull/95)) diff --git a/docs/database/elasticsearch.md b/docs/database/elasticsearch.md index dd9febe4b1..1ff65c7e9a 100644 --- a/docs/database/elasticsearch.md +++ b/docs/database/elasticsearch.md @@ -40,7 +40,7 @@ in order to map the path part values to their names. | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| | `db.elasticsearch.cluster.name` | string | Represents the identifier of an Elasticsearch cluster. | `e9106fc68e3044f0b1475b04bf4ffd5f` | Recommended: [1] | -| `db.elasticsearch.cluster.instance` | string | Represents the identifier of the node/instance to which the request was routed. | `instance-0000000001` | Recommended: [2] | +| `db.elasticsearch.node.name` | string | Represents the human-readable identifier of the node/instance to which a request was routed. | `instance-0000000001` | Recommended: [2] | | [`db.operation`](database-spans.md) | string | The endpoint identifier for the request. [3] | `search`; `ml.close_job`; `cat.aliases` | Required | | [`db.statement`](database-spans.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: [4] | | `http.request.method` | string | HTTP request method. [5] | `GET`; `POST`; `HEAD` | Required | diff --git a/model/trace/database.yaml b/model/trace/database.yaml index f0e529bbd8..2348a2a0f0 100644 --- a/model/trace/database.yaml +++ b/model/trace/database.yaml @@ -463,14 +463,14 @@ groups: brief: > Represents the identifier of an Elasticsearch cluster. examples: ["e9106fc68e3044f0b1475b04bf4ffd5f"] - - id: cluster.instance + - id: node.name type: string requirement_level: recommended: > When communicating with an Elastic Cloud deployment, this should be collected from the "X-Found-Handling-Instance" HTTP response header. tag: call-level-tech-specific brief: > - Represents the identifier of the node/instance to which the request was routed. + Represents the human-readable identifier of the node/instance to which a request was routed. examples: ["instance-0000000001"] - id: db.sql From 1bf0089eb44784966f2281435b60a2a5b844b7a1 Mon Sep 17 00:00:00 2001 From: Steve Gordon Date: Mon, 11 Sep 2023 08:50:47 +0100 Subject: [PATCH 9/9] Update example --- docs/database/elasticsearch.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/database/elasticsearch.md b/docs/database/elasticsearch.md index 1ff65c7e9a..43003ddc8b 100644 --- a/docs/database/elasticsearch.md +++ b/docs/database/elasticsearch.md @@ -94,7 +94,7 @@ the server address behind any intermediaries (e.g. proxies) if it's available. | `db.operation` | `"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.elasticsearch.cluster_instance` | `"instance-0000000001"` | +| `db.elasticsearch.cluster.name` | `"e9106fc68e3044f0b1475b04bf4ffd5f"` | +| `db.elasticsearch.node.name` | `"instance-0000000001"` | [DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.22.0/specification/document-status.md