From 745946765cc1581f92642837ba479b86d3c3a3a9 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Sun, 29 Oct 2023 09:03:20 -0700 Subject: [PATCH] Make client.address and client.port sampling relevant on HTTP server spans --- CHANGELOG.md | 4 ++++ docs/http/http-spans.md | 2 ++ model/trace/http.yaml | 2 ++ 3 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f08fcdcd49..f7f807d3b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,10 @@ 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)) +- 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. + ([#999](https://github.com/open-telemetry/semantic-conventions/pull/999)) ### 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).