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

http.server.active_requests and http.status_code #3357

Closed
JamesNK opened this issue Apr 3, 2023 · 2 comments · Fixed by #3366
Closed

http.server.active_requests and http.status_code #3357

JamesNK opened this issue Apr 3, 2023 · 2 comments · Fixed by #3366
Assignees
Labels
area:semantic-conventions Related to semantic conventions bug Something isn't working [label deprecated] triaged-accepted [label deprecated] Issue triaged and accepted by OTel community, can proceed with creating a PR semconv:HTTP spec:metrics Related to the specification/metrics directory

Comments

@JamesNK
Copy link

JamesNK commented Apr 3, 2023

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?

@JamesNK JamesNK added the spec:metrics Related to the specification/metrics directory label Apr 3, 2023
@mateuszrzeszutek
Copy link
Member

Also it looks like the active requests counter does not have the net.protocol.name & net.protocol.version attributes (unlike all the other HTTP metrics); it used to have http.flavor before we made the change to net.protocol.*.

cc @trask @lmolkova

@trask
Copy link
Member

trask commented Apr 4, 2023

Discussed in Semantic Conventions WG yesterday, and there are two actions we should take:

  • remove http.status_code attribute from http.server.active_requests metric
  • add a note to general metric semantic conventions about UpDownCounter metrics needing to ensure the same attribute set is always recorded on both up/down

@reyang reyang added the [label deprecated] triaged-accepted [label deprecated] Issue triaged and accepted by OTel community, can proceed with creating a PR label Apr 4, 2023
@github-project-automation github-project-automation bot moved this from Blocker for stability to Done in Spec: HTTP Semantic Conventions Apr 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:semantic-conventions Related to semantic conventions bug Something isn't working [label deprecated] triaged-accepted [label deprecated] Issue triaged and accepted by OTel community, can proceed with creating a PR semconv:HTTP spec:metrics Related to the specification/metrics directory
Projects
5 participants