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.*.duration to http.*.request.duration #224

Merged
merged 7 commits into from
Aug 3, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ release.
([#95](https://github.com/open-telemetry/semantic-conventions/pull/95))
- Update `.count` metric naming convention so that it only applies to UpDownCounters,
and add that `.total` should not be used by either Counters or UpDownCounters
([#107](https://github.com/open-telemetry/opentelemetry-specification/pull/107))
([#107](https://github.com/open-telemetry/semantic-conventions/pull/107))
- BREAKING: Rename `http.client.duration` and `http.server.duration` metrics to
`http.client.request.duration` and `http.server.request.duration` respectively.
([#224](https://github.com/open-telemetry/semantic-conventions/pull/224))

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

Expand Down
2 changes: 1 addition & 1 deletion docs/general/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ question is a non-unit (like `{fault}` or `{operation}`).

Examples:

* `system.filesystem.utilization`, `http.server.duration`, and `system.cpu.time`
* `system.filesystem.utilization`, `http.server.request.duration`, and `system.cpu.time`
should not be pluralized, even if many data points are recorded.
* `system.paging.faults`, `system.disk.operations`, and `system.network.packets`
should be pluralized, even if only a single data point is recorded.
Expand Down
20 changes: 10 additions & 10 deletions docs/http/http-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ operations. By adding HTTP attributes to metric events it allows for finely tune
<!-- toc -->

- [HTTP Server](#http-server)
* [Metric: `http.server.duration`](#metric-httpserverduration)
* [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)
- [HTTP Client](#http-client)
* [Metric: `http.client.duration`](#metric-httpclientduration)
* [Metric: `http.client.request.duration`](#metric-httpclientrequestduration)
* [Metric: `http.client.request.size`](#metric-httpclientrequestsize)
* [Metric: `http.client.response.size`](#metric-httpclientresponsesize)

Expand Down Expand Up @@ -53,7 +53,7 @@ operations. By adding HTTP attributes to metric events it allows for finely tune

## HTTP Server

### Metric: `http.server.duration`
### Metric: `http.server.request.duration`

**Status**: [Experimental, Feature-freeze][DocumentStatus]

Expand All @@ -65,13 +65,13 @@ This metric SHOULD be specified with
[`ExplicitBucketBoundaries`](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.22.0/specification/metrics/api.md#instrument-advice)
of `[ 0, 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10 ]`.

<!-- semconv metric.http.server.duration(metric_table) -->
<!-- semconv metric.http.server.request.duration(metric_table) -->
| Name | Instrument Type | Unit (UCUM) | Description |
| -------- | --------------- | ----------- | -------------- |
| `http.server.duration` | Histogram | `s` | Measures the duration of inbound HTTP requests. |
| `http.server.request.duration` | Histogram | `s` | Measures the duration of inbound HTTP requests. |
<!-- endsemconv -->

<!-- semconv metric.http.server.duration(full) -->
<!-- semconv metric.http.server.request.duration(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 @@ -364,7 +364,7 @@ SHOULD NOT be set if only IP address is available and capturing name would requi

## HTTP Client

### Metric: `http.client.duration`
### Metric: `http.client.request.duration`

**Status**: [Experimental, Feature-freeze][DocumentStatus]

Expand All @@ -376,13 +376,13 @@ This metric SHOULD be specified with
[`ExplicitBucketBoundaries`](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.22.0/specification/metrics/api.md#instrument-advice)
of `[ 0, 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10 ]`.

<!-- semconv metric.http.client.duration(metric_table) -->
<!-- semconv metric.http.client.request.duration(metric_table) -->
| Name | Instrument Type | Unit (UCUM) | Description |
| -------- | --------------- | ----------- | -------------- |
| `http.client.duration` | Histogram | `s` | Measures the duration of outbound HTTP requests. |
| `http.client.request.duration` | Histogram | `s` | Measures the duration of outbound HTTP requests. |
<!-- endsemconv -->

<!-- semconv metric.http.client.duration(full) -->
<!-- semconv metric.http.client.request.duration(full) -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `http.request.method` | string | HTTP request method. [1] | `GET`; `POST`; `HEAD` | Required |
Expand Down
8 changes: 4 additions & 4 deletions model/metrics/http.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ groups:
- ref: network.protocol.version
- ref: server.socket.address

- id: metric.http.server.duration
- id: metric.http.server.request.duration
type: metric
metric_name: http.server.duration
metric_name: http.server.request.duration
brief: "Measures the duration of inbound HTTP requests."
instrument: histogram
unit: "s"
Expand Down Expand Up @@ -110,9 +110,9 @@ groups:
unit: "By"
extends: metric_attributes.http.server

- id: metric.http.client.duration
- id: metric.http.client.request.duration
type: metric
metric_name: http.client.duration
metric_name: http.client.request.duration
brief: "Measures the duration of outbound HTTP requests."
instrument: histogram
unit: "s"
Expand Down
6 changes: 6 additions & 0 deletions schema-next.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ file_format: 1.1.0
schema_url: https://opentelemetry.io/schemas/1.21.0
versions:
next:
metrics:
changes:
# https://github.com/open-telemetry/semantic-conventions/pull/224
- rename_metrics:
http.client.duration: http.client.request.duration
http.server.duration: http.server.request.duration
1.21.0:
spans:
changes:
Expand Down
Loading