From 246d42e8eb4e6829e07b10357ebb39e3bf8a3c33 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Thu, 26 Oct 2023 14:58:24 -0700 Subject: [PATCH 1/2] Change precedence between :authority and Host headers --- CHANGELOG.md | 3 +++ docs/http/http-spans.md | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a7e7f656d5..354c8a83b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,6 +51,9 @@ release. ([#413](https://github.com/open-telemetry/semantic-conventions/pull/413)) - Clarify HTTP server definitions and `server.address|port` notes. ([#423](https://github.com/open-telemetry/semantic-conventions/pull/423)) +- Change pthe recedence between `:authority` and `Host` headers when populating + `server.address` and `server.port` attributes. + ([#455](https://github.com/open-telemetry/semantic-conventions/pull/455)) ## v1.22.0 (2023-10-12) diff --git a/docs/http/http-spans.md b/docs/http/http-spans.md index e57d33931f..e025993e86 100644 --- a/docs/http/http-spans.md +++ b/docs/http/http-spans.md @@ -312,8 +312,8 @@ In the context of HTTP server, `server.address` and `server.port` attributes cap HTTP server instrumentations SHOULD do the best effort when populating `server.address` and `server.port` attributes and SHOULD determine them by using the first of the following that applies: * The original host which may be passed by the reverse proxy in the [`Forwarded#host`][Forwarded], [`X-Forwarded-Host`][X-Forwarded-Host], or a similar header. -* The [`Host`][Host header] header. * The [`:authority`][HTTP/2 authority] pseudo-header in case of HTTP/2 or HTTP/3 +* The [`Host`][Host header] header. > **Note**: The `Host` and `:authority` headers contain host and port number of the server. The same applies to the `host` identifier of `Forwarded` header or the `X-Forwarded-Host` header. Instrumentations SHOULD populate both `server.address` and `server.port` attributes by parsing the value of corresponding header. From fe1f4ead1222048ca7e0636442c242234f9d00ff Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Thu, 26 Oct 2023 17:52:46 -0700 Subject: [PATCH 2/2] Update CHANGELOG.md Co-authored-by: Liudmila Molkova --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 354c8a83b0..ac70a920bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,7 +51,7 @@ release. ([#413](https://github.com/open-telemetry/semantic-conventions/pull/413)) - Clarify HTTP server definitions and `server.address|port` notes. ([#423](https://github.com/open-telemetry/semantic-conventions/pull/423)) -- Change pthe recedence between `:authority` and `Host` headers when populating +- Change the precedence between `:authority` and `Host` headers when populating `server.address` and `server.port` attributes. ([#455](https://github.com/open-telemetry/semantic-conventions/pull/455))