From de4125d0307e97474ea05d40b3c7945a027745b3 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Mon, 30 Oct 2023 08:42:07 -0700 Subject: [PATCH] Clarify that `client.port` is the port of whichever client was captured in `client.address` (#471) --- CHANGELOG.md | 2 ++ docs/http/http-spans.md | 2 +- model/trace/http.yaml | 5 +---- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b882b80cb7..60b5bd3232 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,8 @@ release. - Change `http.request.body.size` and `http.response.body.size` from recommended to opt-in. ([#460](https://github.com/open-telemetry/semantic-conventions/pull/460)) +- Clarify that `client.port` is the port of whichever client was captured in `client.address`. + ([#471](https://github.com/open-telemetry/semantic-conventions/pull/471)) ### Features diff --git a/docs/http/http-spans.md b/docs/http/http-spans.md index 65a0bcf71f..4919481e88 100644 --- a/docs/http/http-spans.md +++ b/docs/http/http-spans.md @@ -341,7 +341,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#for](https://developer.mozilla.org/docs/Web/HTTP/Headers/Forwarded#for) or a similar header). Otherwise, the immediate client peer port. [2] | `65123` | Recommended | +| [`client.port`](../general/attributes.md) | int | The port of whichever client was captured in `client.address`. [2] | `65123` | Recommended | | [`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 fb8c59bae1..e9f3146105 100644 --- a/model/trace/http.yaml +++ b/model/trace/http.yaml @@ -71,10 +71,7 @@ groups: Otherwise, the immediate client peer address. examples: ['83.164.160.102'] - ref: client.port - brief: > - The port of the original client behind all proxies, if - known (e.g. from [Forwarded#for](https://developer.mozilla.org/docs/Web/HTTP/Headers/Forwarded#for) or a similar header). - Otherwise, the immediate client peer port. + brief: The port of whichever client was captured in `client.address`. - ref: url.path requirement_level: required sampling_relevant: true