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.server.active_requests metric to http.server.current_requests #465

Closed
Closed
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
- Rename `http.server.active_requests` metric to `http.server.current_requests`.
([#465](https://github.com/open-telemetry/semantic-conventions/pull/465))

### Features

Expand Down
2 changes: 1 addition & 1 deletion docs/general/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ implementation detail. Both choices are compliant with this specification.
When recording `UpDownCounter` metrics, the same attribute values used to record an increment SHOULD be used to record
any associated decrement, otherwise those increments and decrements will end up as different timeseries.

For example, if you are tracking `active_requests` with an `UpDownCounter`, and you are incrementing it each time a
For example, if you are tracking `current_requests` with an `UpDownCounter`, and you are incrementing it each time a
request starts and decrementing it each time a request ends, then any attributes which are not yet available when
incrementing the counter at request start should not be used when decrementing the counter at request end.

Expand Down
10 changes: 5 additions & 5 deletions docs/http/http-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ 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.current_requests`](#metric-httpservercurrent_requests)
* [Metric: `http.server.request.body.size`](#metric-httpserverrequestbodysize)
* [Metric: `http.server.response.body.size`](#metric-httpserverresponsebodysize)
- [HTTP Client](#http-client)
Expand Down Expand Up @@ -159,19 +159,19 @@ SHOULD include the [application root](/docs/http/http-spans.md#http-server-defin
| `_OTHER` | Any HTTP method that the instrumentation has no prior knowledge of. |
<!-- endsemconv -->

### Metric: `http.server.active_requests`
### Metric: `http.server.current_requests`

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

This metric is optional.

<!-- semconv metric.http.server.active_requests(metric_table) -->
<!-- semconv metric.http.server.current_requests(metric_table) -->
| Name | Instrument Type | Unit (UCUM) | Description |
| -------- | --------------- | ----------- | -------------- |
| `http.server.active_requests` | UpDownCounter | `{request}` | Number of active HTTP server requests. |
| `http.server.current_requests` | UpDownCounter | `{request}` | Number of current HTTP server requests. |
<!-- endsemconv -->

<!-- semconv metric.http.server.active_requests(full) -->
<!-- semconv metric.http.server.current_requests(full) -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| [`http.request.method`](../attributes-registry/http.md) | string | HTTP request method. [1] | `GET`; `POST`; `HEAD` | Required |
Expand Down
6 changes: 3 additions & 3 deletions model/metrics/http.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ groups:
unit: "s"
extends: metric_attributes.http.server

- id: metric.http.server.active_requests
- id: metric.http.server.current_requests
type: metric
metric_name: http.server.active_requests
brief: "Number of active HTTP server requests."
metric_name: http.server.current_requests
brief: "Number of current HTTP server requests."
instrument: updowncounter
unit: "{request}"
attributes:
Expand Down
3 changes: 3 additions & 0 deletions schema-next.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ versions:
thread.daemon: jvm.thread.daemon
apply_to_metrics:
- jvm.thread.count
# https://github.com/open-telemetry/semantic-conventions/pull/465
- rename_metrics:
http.server.active_requests: http.server.current_requests
1.22.0:
spans:
changes:
Expand Down
Loading