Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename http body size metrics to match attribute names #247

Merged
merged 5 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ release.
- Clarify that `http/dup` has higher precedence than `http` in case both values are present
in `OTEL_SEMCONV_STABILITY_OPT_IN`
([#249](https://github.com/open-telemetry/semantic-conventions/pull/249))
- BREAKING: Rename `http.server.request.size` metric to `http.server.request.body.size`
and `http.server.response.size` metric to `http.server.response.body.size`
([#247](https://github.com/open-telemetry/semantic-conventions/pull/247))

## v1.21.0 (2023-07-13)

Expand Down
40 changes: 20 additions & 20 deletions docs/http/http-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ operations. By adding HTTP attributes to metric events it allows for finely tune
- [HTTP Server](#http-server)
* [Metric: `http.server.request.duration`](#metric-httpserverrequestduration)
* [Metric: `http.server.active_requests`](#metric-httpserveractive_requests)
* [Metric: `http.server.request.size`](#metric-httpserverrequestsize)
* [Metric: `http.server.response.size`](#metric-httpserverresponsesize)
* [Metric: `http.server.request.body.size`](#metric-httpserverrequestbodysize)
* [Metric: `http.server.response.body.size`](#metric-httpserverresponsebodysize)
- [HTTP Client](#http-client)
* [Metric: `http.client.request.duration`](#metric-httpclientrequestduration)
* [Metric: `http.client.request.size`](#metric-httpclientrequestsize)
* [Metric: `http.client.response.size`](#metric-httpclientresponsesize)
* [Metric: `http.client.request.body.size`](#metric-httpclientrequestbodysize)
* [Metric: `http.client.response.body.size`](#metric-httpclientresponsebodysize)

<!-- tocstop -->

Expand Down Expand Up @@ -205,19 +205,19 @@ SHOULD NOT be set if only IP address is available and capturing name would requi
| `_OTHER` | Any HTTP method that the instrumentation has no prior knowledge of. |
<!-- endsemconv -->

### Metric: `http.server.request.size`
### Metric: `http.server.request.body.size`

**Status**: [Experimental][DocumentStatus]

This metric is optional.

<!-- semconv metric.http.server.request.size(metric_table) -->
<!-- semconv metric.http.server.request.body.size(metric_table) -->
| Name | Instrument Type | Unit (UCUM) | Description |
| -------- | --------------- | ----------- | -------------- |
| `http.server.request.size` | Histogram | `By` | Measures the size of HTTP request messages (compressed). |
| `http.server.request.body.size` | Histogram | `By` | The size of the request 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. |
<!-- endsemconv -->

<!-- semconv metric.http.server.request.size(full) -->
<!-- semconv metric.http.server.request.body.size(full) -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `http.route` | string | The matched route (path template in the format used by the respective server framework). See note below [1] | `/users/:userID?`; `{controller}/{action}/{id?}` | Conditionally Required: If and only if it's available |
Expand Down Expand Up @@ -282,19 +282,19 @@ SHOULD NOT be set if only IP address is available and capturing name would requi
| `_OTHER` | Any HTTP method that the instrumentation has no prior knowledge of. |
<!-- endsemconv -->

### Metric: `http.server.response.size`
### Metric: `http.server.response.body.size`

**Status**: [Experimental][DocumentStatus]

This metric is optional.

<!-- semconv metric.http.server.response.size(metric_table) -->
<!-- semconv metric.http.server.response.body.size(metric_table) -->
| Name | Instrument Type | Unit (UCUM) | Description |
| -------- | --------------- | ----------- | -------------- |
| `http.server.response.size` | Histogram | `By` | Measures the size of HTTP response messages (compressed). |
| `http.server.response.body.size` | Histogram | `By` | 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. |
<!-- endsemconv -->

<!-- semconv metric.http.server.response.size(full) -->
<!-- semconv metric.http.server.response.body.size(full) -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `http.route` | string | The matched route (path template in the format used by the respective server framework). See note below [1] | `/users/:userID?`; `{controller}/{action}/{id?}` | Conditionally Required: If and only if it's available |
Expand Down Expand Up @@ -438,19 +438,19 @@ When observed from the server side, this SHOULD represent the physical server ad
| `_OTHER` | Any HTTP method that the instrumentation has no prior knowledge of. |
<!-- endsemconv -->

### Metric: `http.client.request.size`
### Metric: `http.client.request.body.size`

**Status**: [Experimental][DocumentStatus]

This metric is optional.

<!-- semconv metric.http.client.request.size(metric_table) -->
<!-- semconv metric.http.client.request.body.size(metric_table) -->
| Name | Instrument Type | Unit (UCUM) | Description |
| -------- | --------------- | ----------- | -------------- |
| `http.client.request.size` | Histogram | `By` | Measures the size of HTTP request messages (compressed). |
| `http.client.request.body.size` | Histogram | `By` | Measures the size of HTTP request messages (compressed). |
<!-- endsemconv -->

<!-- semconv metric.http.client.request.size(full) -->
<!-- semconv metric.http.client.request.body.size(full) -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `http.request.method` | string | HTTP request method. [1] | `GET`; `POST`; `HEAD` | Required |
Expand Down Expand Up @@ -509,19 +509,19 @@ When observed from the server side, this SHOULD represent the physical server ad
| `_OTHER` | Any HTTP method that the instrumentation has no prior knowledge of. |
<!-- endsemconv -->

### Metric: `http.client.response.size`
### Metric: `http.client.response.body.size`

**Status**: [Experimental][DocumentStatus]

This metric is optional.

<!-- semconv metric.http.client.response.size(metric_table) -->
<!-- semconv metric.http.client.response.body.size(metric_table) -->
| Name | Instrument Type | Unit (UCUM) | Description |
| -------- | --------------- | ----------- | -------------- |
| `http.client.response.size` | Histogram | `By` | Measures the size of HTTP response messages (compressed). |
| `http.client.response.body.size` | Histogram | `By` | Measures the size of HTTP response messages (compressed). |
<!-- endsemconv -->

<!-- semconv metric.http.client.response.size(full) -->
<!-- semconv metric.http.client.response.body.size(full) -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `http.request.method` | string | HTTP request method. [1] | `GET`; `POST`; `HEAD` | Required |
Expand Down
26 changes: 16 additions & 10 deletions model/metrics/http.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,24 @@ groups:
if it's sent in absolute-form.
- Port identifier of the `Host` header

- id: metric.http.server.request.size
- id: metric.http.server.request.body.size
type: metric
metric_name: http.server.request.size
brief: "Measures the size of HTTP request messages (compressed)."
metric_name: http.server.request.body.size
brief: >
The size of the request 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.
instrument: histogram
unit: "By"
extends: metric_attributes.http.server

- id: metric.http.server.response.size
- id: metric.http.server.response.body.size
type: metric
metric_name: http.server.response.size
brief: "Measures the size of HTTP response messages (compressed)."
metric_name: http.server.response.body.size
brief: >
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.
instrument: histogram
unit: "By"
extends: metric_attributes.http.server
Expand All @@ -118,17 +124,17 @@ groups:
unit: "s"
extends: metric_attributes.http.client

- id: metric.http.client.request.size
- id: metric.http.client.request.body.size
type: metric
metric_name: http.client.request.size
metric_name: http.client.request.body.size
brief: "Measures the size of HTTP request messages (compressed)."
instrument: histogram
unit: "By"
extends: metric_attributes.http.client

- id: metric.http.client.response.size
- id: metric.http.client.response.body.size
type: metric
metric_name: http.client.response.size
metric_name: http.client.response.body.size
brief: "Measures the size of HTTP response messages (compressed)."
instrument: histogram
unit: "By"
Expand Down
4 changes: 4 additions & 0 deletions schema-next.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ versions:
- jvm.buffer.usage
- jvm.buffer.limit
- jvm.buffer.count
# https://github.com/open-telemetry/semantic-conventions/pull/247
- rename_metrics:
http.server.request.size: http.server.request.body.size
http.server.response.size: http.server.response.body.size
1.21.0:
spans:
changes:
Expand Down