From b7a3994f03eb40de019441956357f78c295aade5 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Tue, 10 Oct 2023 12:25:36 -0700 Subject: [PATCH 1/2] Rename http.resend_count to http.request.resend_count --- CHANGELOG.md | 2 ++ docs/attributes-registry/http.md | 2 +- docs/http/http-spans.md | 2 +- model/registry/http.yaml | 2 +- model/trace/http.yaml | 2 +- schema-next.yaml | 6 ++++++ 6 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3563762c3a..2738c720f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -139,6 +139,8 @@ release. - BREAKING: Rename/replace `(client|server).socket.(address|port)` attributes with `network.(peer|local).(address|port)`. ([#342](https://github.com/open-telemetry/semantic-conventions/pull/342)) +- BREAKING: Rename http.resend_count to http.request.resend_count. + ([#374](https://github.com/open-telemetry/semantic-conventions/pull/374)) ## v1.21.0 (2023-07-13) diff --git a/docs/attributes-registry/http.md b/docs/attributes-registry/http.md index 7a62cc8498..7f8602c372 100644 --- a/docs/attributes-registry/http.md +++ b/docs/attributes-registry/http.md @@ -12,7 +12,7 @@ | `http.request.header.` | string[] | HTTP request headers, `` being the normalized HTTP Header name (lowercase, with `-` characters replaced by `_`), the value being the header values. [1] | `http.request.header.content_type=["application/json"]`; `http.request.header.x_forwarded_for=["1.2.3.4", "1.2.3.5"]` | | `http.request.method` | string | HTTP request method. [2] | `GET`; `POST`; `HEAD` | | `http.request.method_original` | string | Original HTTP method sent by the client in the request line. | `GeT`; `ACL`; `foo` | -| `http.resend_count` | int | The ordinal number of request resending attempt (for any reason, including redirects). [3] | `3` | +| `http.request.resend_count` | int | The ordinal number of request resending attempt (for any reason, including redirects). [3] | `3` | | `http.response.body.size` | int | The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size. | `3495` | | `http.response.header.` | string[] | HTTP response headers, `` being the normalized HTTP Header name (lowercase, with `-` characters replaced by `_`), the value being the header values. [4] | `http.response.header.content_type=["application/json"]`; `http.response.header.my_custom_header=["abc", "def"]` | | `http.response.status_code` | int | [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). | `200` | diff --git a/docs/http/http-spans.md b/docs/http/http-spans.md index 9ed59f4f33..cb55bde01c 100644 --- a/docs/http/http-spans.md +++ b/docs/http/http-spans.md @@ -243,7 +243,7 @@ For an HTTP client span, `SpanKind` MUST be `Client`. | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| -| [`http.resend_count`](../attributes-registry/http.md) | int | The ordinal number of request resending attempt (for any reason, including redirects). [1] | `3` | Recommended: if and only if request was retried. | +| [`http.request.resend_count`](../attributes-registry/http.md) | int | The ordinal number of request resending attempt (for any reason, including redirects). [1] | `3` | Recommended: if and only if request was retried. | | [`network.peer.address`](../general/attributes.md) | string | Peer address of the network connection - IP address or Unix domain socket name. | `10.1.2.80`; `/tmp/my.sock` | Recommended: If different than `server.address`. | | [`network.peer.port`](../general/attributes.md) | int | Peer port number of the network connection. | `65123` | Recommended: If `network.peer.address` is set. | | [`server.address`](../general/attributes.md) | string | Host identifier of the ["URI origin"](https://www.rfc-editor.org/rfc/rfc9110.html#name-uri-origin) HTTP request is sent to. [2] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | Required | diff --git a/model/registry/http.yaml b/model/registry/http.yaml index 1d6f0192fa..05483ec79b 100644 --- a/model/registry/http.yaml +++ b/model/registry/http.yaml @@ -81,7 +81,7 @@ groups: type: string brief: Original HTTP method sent by the client in the request line. examples: ["GeT", "ACL", "foo"] - - id: resend_count + - id: request.resend_count type: int brief: > The ordinal number of request resending attempt (for any reason, including redirects). diff --git a/model/trace/http.yaml b/model/trace/http.yaml index dd224b7bb5..b40d3ac4e9 100644 --- a/model/trace/http.yaml +++ b/model/trace/http.yaml @@ -31,7 +31,7 @@ groups: span_kind: client brief: 'Semantic Convention for HTTP Client' attributes: - - ref: http.resend_count + - ref: http.request.resend_count requirement_level: recommended: if and only if request was retried. - ref: server.address diff --git a/schema-next.yaml b/schema-next.yaml index 066a9ce9ef..7ae2e0e04f 100644 --- a/schema-next.yaml +++ b/schema-next.yaml @@ -141,6 +141,12 @@ versions: - rename_attributes: attribute_map: telemetry.auto.version: telemetry.distro.version + spans: + changes: + # https://github.com/open-telemetry/opentelemetry-specification/pull/374 + - rename_attributes: + attribute_map: + http.resend_count: http.request.resend_count 1.21.0: spans: changes: From 542f8cc1c2e69dfbd5c44c218baedd45f7f6861b Mon Sep 17 00:00:00 2001 From: Alexander Wert Date: Mon, 16 Oct 2023 07:26:33 +0200 Subject: [PATCH 2/2] Fix conflict in schema-next.yaml --- schema-next.yaml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/schema-next.yaml b/schema-next.yaml index 74ff5c5cd0..2805a009d8 100644 --- a/schema-next.yaml +++ b/schema-next.yaml @@ -8,6 +8,10 @@ versions: - rename_attributes: attribute_map: messaging.message.payload_size_bytes: messaging.message.body.size + # https://github.com/open-telemetry/opentelemetry-specification/pull/374 + - rename_attributes: + attribute_map: + http.resend_count: http.request.resend_count metrics: changes: # https://github.com/open-telemetry/semantic-conventions/pull/224 @@ -143,12 +147,6 @@ versions: - rename_attributes: attribute_map: telemetry.auto.version: telemetry.distro.version - spans: - changes: - # https://github.com/open-telemetry/opentelemetry-specification/pull/374 - - rename_attributes: - attribute_map: - http.resend_count: http.request.resend_count 1.21.0: spans: changes: