From 16896273bd511b5d5fb86efbec800d2b943a0879 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Thu, 2 Mar 2023 12:17:45 -0800 Subject: [PATCH 1/3] net.peer.name clarification for HTTP client semconv --- semantic_conventions/trace/http.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/semantic_conventions/trace/http.yaml b/semantic_conventions/trace/http.yaml index daccc90f44a..deba4ede33c 100644 --- a/semantic_conventions/trace/http.yaml +++ b/semantic_conventions/trace/http.yaml @@ -75,7 +75,8 @@ groups: if it's sent in absolute-form - Host identifier of the `Host` header - SHOULD NOT be set if capturing it would require an extra DNS lookup. + If an HTTP client request is explicitly made to an IP address, e.g. `http://x.x.x.x:8080`, then + `net.peer.name` SHOULD be the IP address `x.x.x.x`. A DNS lookup SHOULD NOT be used. - ref: net.peer.port sampling_relevant: true requirement_level: From 54fb5c95e2876b79ff682d2f302ed11ee67f7bfc Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Thu, 2 Mar 2023 12:20:46 -0800 Subject: [PATCH 2/3] Add change log entry --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 58e5986ba9b..2293bbc66a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,9 @@ release. ([#3220](https://github.com/open-telemetry/opentelemetry-specification/pull/3220)) - Remove mention of `net.transport` from HTTP semantic conventions ([#3244](https://github.com/open-telemetry/opentelemetry-specification/pull/3244)) +- Clarifies that if an HTTP client request is explicitly made to an IP address, + e.g. `http://x.x.x.x:8080`, then `net.peer.name` SHOULD be the IP address `x.x.x.x` + ([#3276](https://github.com/open-telemetry/opentelemetry-specification/pull/3276)) ### Compatibility From 555f30114fa628e92d205c8285d3a4624cea00dd Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Thu, 2 Mar 2023 12:21:19 -0800 Subject: [PATCH 3/3] make table-generation --- specification/trace/semantic_conventions/http.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/specification/trace/semantic_conventions/http.md b/specification/trace/semantic_conventions/http.md index 014c9cf5d89..a4b912448c1 100644 --- a/specification/trace/semantic_conventions/http.md +++ b/specification/trace/semantic_conventions/http.md @@ -152,7 +152,8 @@ before any HTTP-redirects that may happen when executing the request. if it's sent in absolute-form - Host identifier of the `Host` header -SHOULD NOT be set if capturing it would require an extra DNS lookup. +If an HTTP client request is explicitly made to an IP address, e.g. `http://x.x.x.x:8080`, then +`net.peer.name` SHOULD be the IP address `x.x.x.x`. A DNS lookup SHOULD NOT be used. **[4]:** When [request target](https://www.rfc-editor.org/rfc/rfc9110.html#target.resource) is absolute URI, `net.peer.name` MUST match URI port identifier, otherwise it MUST match `Host` header port identifier.