From 4598fdced43d9c880278e5f7df06758c44172465 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Sun, 29 Oct 2023 09:03:20 -0700 Subject: [PATCH 1/2] Make client.address and client.port sampling relevant on HTTP server spans --- CHANGELOG.md | 2 ++ docs/http/http-spans.md | 2 ++ model/trace/http.yaml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f08fcdcd49..2432f49ee6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,8 @@ release. ([#409](https://github.com/open-telemetry/semantic-conventions/pull/409)) - Remove `url.path` default value. ([#462](https://github.com/open-telemetry/semantic-conventions/pull/462)) +- Make `client.address` and `client.port` sampling relevant on HTTP server spans. + ([#469](https://github.com/open-telemetry/semantic-conventions/pull/469)) ### Features diff --git a/docs/http/http-spans.md b/docs/http/http-spans.md index 9fb630a43a..e5868692a6 100644 --- a/docs/http/http-spans.md +++ b/docs/http/http-spans.md @@ -374,6 +374,8 @@ SHOULD include the [application root](/docs/http/http-spans.md#http-server-defin Following attributes MUST be provided **at span creation time** (when provided at all), so they can be considered for sampling decisions: +* [`client.address`](../general/attributes.md) +* [`client.port`](../general/attributes.md) * [`server.address`](../general/attributes.md) * [`server.port`](../general/attributes.md) * [`url.path`](../attributes-registry/url.md) diff --git a/model/trace/http.yaml b/model/trace/http.yaml index 5749f3a6f5..07c83bf527 100644 --- a/model/trace/http.yaml +++ b/model/trace/http.yaml @@ -67,6 +67,7 @@ groups: requirement_level: opt_in brief: Local socket port. Useful in case of a multi-port host. - ref: client.address + sampling_relevant: true note: > The IP address of the original client behind all proxies, if known (e.g. from [Forwarded](https://developer.mozilla.org/docs/Web/HTTP/Headers/Forwarded), @@ -74,6 +75,7 @@ groups: Otherwise, the immediate client peer address. examples: ['83.164.160.102'] - ref: client.port + sampling_relevant: true brief: > The port of the original client behind all proxies, if known (e.g. from [Forwarded](https://developer.mozilla.org/docs/Web/HTTP/Headers/Forwarded) or a similar header). From 57b9a07ba1dc2bab71c33c5e3c0e173a46a02803 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Sun, 29 Oct 2023 09:48:15 -0700 Subject: [PATCH 2/2] only client.address --- CHANGELOG.md | 2 +- docs/http/http-spans.md | 1 - model/trace/http.yaml | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2432f49ee6..e13149cb25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,7 +32,7 @@ release. ([#409](https://github.com/open-telemetry/semantic-conventions/pull/409)) - Remove `url.path` default value. ([#462](https://github.com/open-telemetry/semantic-conventions/pull/462)) -- Make `client.address` and `client.port` sampling relevant on HTTP server spans. +- Make `client.address` sampling relevant on HTTP server spans. ([#469](https://github.com/open-telemetry/semantic-conventions/pull/469)) ### Features diff --git a/docs/http/http-spans.md b/docs/http/http-spans.md index e5868692a6..9f4ea0e157 100644 --- a/docs/http/http-spans.md +++ b/docs/http/http-spans.md @@ -375,7 +375,6 @@ SHOULD include the [application root](/docs/http/http-spans.md#http-server-defin Following attributes MUST be provided **at span creation time** (when provided at all), so they can be considered for sampling decisions: * [`client.address`](../general/attributes.md) -* [`client.port`](../general/attributes.md) * [`server.address`](../general/attributes.md) * [`server.port`](../general/attributes.md) * [`url.path`](../attributes-registry/url.md) diff --git a/model/trace/http.yaml b/model/trace/http.yaml index 07c83bf527..566e1d8988 100644 --- a/model/trace/http.yaml +++ b/model/trace/http.yaml @@ -75,7 +75,6 @@ groups: Otherwise, the immediate client peer address. examples: ['83.164.160.102'] - ref: client.port - sampling_relevant: true brief: > The port of the original client behind all proxies, if known (e.g. from [Forwarded](https://developer.mozilla.org/docs/Web/HTTP/Headers/Forwarded) or a similar header).