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 instrumentation metrics naming not matching OTel spec. #4874

Closed
evan361425 opened this issue Jul 22, 2024 · 2 comments
Closed

HTTP instrumentation metrics naming not matching OTel spec. #4874

evan361425 opened this issue Jul 22, 2024 · 2 comments
Labels
bug Something isn't working triage

Comments

@evan361425
Copy link

evan361425 commented Jul 22, 2024

What happened?

Steps to Reproduce

Code in https://github.com/open-telemetry/opentelemetry-js/blob/main/experimental/packages/opentelemetry-instrumentation-http/src/http.ts#L77-L95

Expected Result

Follow the HTTP metrics spec, http.server.duration naming should be http.server.request.duration and also the unit should be second not millisecond.

http.client.request.duration has the same issue.

Actual Result

Getting metric's name as http.server.duration not http.server.request.duration

Additional Details

Any customization should be great, or even making these properties protected.

Additionally, the attributes should also follow the recommended spec. Currently we have these attributes:

  • HTTP_METHOD: should use http.request.method
  • NET_PEER_NAME: should use server.address
  • NET_PEER_PORT: should use server.port
  • HTTP_STATUS_CODE: should use http.response.status_code
  • HTTP_FLAVOR: deprecated

Some relevant issues:

OpenTelemetry Setup Code

No response

package.json

No response

Relevant log output

No response

@evan361425 evan361425 added bug Something isn't working triage labels Jul 22, 2024
@JamieDanielson
Copy link
Member

I believe this is a question about the semantic conventions needing to be updated, which is something that we are working on. The current tracking issue is #4572 , but note this is a high priority for us.

@JamieDanielson
Copy link
Member

I'm going to close this as a duplicate since we are aware of it and tracking elsewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

No branches or pull requests

2 participants