From f4a6731a01d45b922a4e38c114551e6001de6570 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Sun, 29 Oct 2023 09:52:57 -0700 Subject: [PATCH] Change client.port from recommended to opt-in on HTTP server spans --- CHANGELOG.md | 2 ++ docs/http/http-spans.md | 2 +- model/trace/http.yaml | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f08fcdcd49..8d8a2cd19f 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)) +- Change `client.port` from recommended to opt-in on HTTP server spans + ([#472](https://github.com/open-telemetry/semantic-conventions/pull/472)) ### Features diff --git a/docs/http/http-spans.md b/docs/http/http-spans.md index 9fb630a43a..d5b1931efc 100644 --- a/docs/http/http-spans.md +++ b/docs/http/http-spans.md @@ -343,7 +343,7 @@ For an HTTP server span, `SpanKind` MUST be `Server`. | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| | [`client.address`](../general/attributes.md) | string | Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. [1] | `83.164.160.102` | Recommended | -| [`client.port`](../general/attributes.md) | int | 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). Otherwise, the immediate client peer port. [2] | `65123` | Recommended | +| [`client.port`](../general/attributes.md) | int | 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). Otherwise, the immediate client peer port. [2] | `65123` | Opt-In | | [`http.route`](../attributes-registry/http.md) | string | The matched route, that is, the path template in the format used by the respective server framework. [3] | `/users/:userID?`; `{controller}/{action}/{id?}` | Conditionally Required: If and only if it's available | | [`network.local.address`](../attributes-registry/network.md) | string | Local socket address. Useful in case of a multi-IP host. | `10.1.2.80`; `/tmp/my.sock` | Opt-In | | [`network.local.port`](../attributes-registry/network.md) | int | Local socket port. Useful in case of a multi-port host. | `65123` | Opt-In | diff --git a/model/trace/http.yaml b/model/trace/http.yaml index 5749f3a6f5..9a43989459 100644 --- a/model/trace/http.yaml +++ b/model/trace/http.yaml @@ -74,6 +74,7 @@ groups: Otherwise, the immediate client peer address. examples: ['83.164.160.102'] - ref: client.port + requirement_level: opt_in 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).