Skip to content

http.server.active_requests and http.status_code #3357

@JamesNK

Description

@JamesNK

I have a question about http.server.active_requests from https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/semantic_conventions/http-metrics.md#metric-httpserveractive_requests

http.server.active_requests is an up/down counter with a bunch of tags. One of the tags is the response status code. How does that work with an up/down counter? Response status code isn't known when the counter is incremented, so it can only be applied when the counter is decremented.

If the response status code is added to the tag collection when decrementing the counter, won't that result in two different values, one always increasing, and the other (with the response status code) always decreasing?

Metadata

Metadata

Assignees

Labels

[label deprecated] triaged-accepted[label deprecated] Issue triaged and accepted by OTel community, can proceed with creating a PRarea:semantic-conventionsRelated to semantic conventionsbugSomething isn't workingsemconv:HTTPspec:metricsRelated to the specification/metrics directory

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions