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

fix(instrumentation-http) Added ATTR_HTTP_ROUTE to the new metric attributes #5079

Closed
wants to merge 2 commits into from

Conversation

lionskape
Copy link

Which problem is this PR solving?

There is no way to create http.route attribute for server metric in "stable-only mode" for http metrics.

Fixes # (issue)

Short description of the changes

Added ATTR_HTTP_ROUTE setup in "stable-only mode" for METRIC_HTTP_SERVER_REQUEST_DURATION in @opentemetry/instrumentation-http

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • switch to stable-only mode in @opentemetry/instrumentation-http
  • add rpc metadata http route, check that metric attribute exists
  • remove rpc metadata http route, check that metric attribute does not exists
  • switch to dup mode in @opentemetry/instrumentation-http
  • add rpc metadata http route, check that metric attribute exists in both stable and old metrics
  • remove rpc metadata http route, check that metric attribute does not exists in both stable and old metrics

Checklist:

  • Followed the style guidelines of this project
  • Unit tests have been added
  • Documentation has been updated

@lionskape lionskape requested a review from a team as a code owner October 20, 2024 23:57
Copy link

linux-foundation-easycla bot commented Oct 20, 2024

CLA Not Signed

@lionskape lionskape changed the title Added ATTR_HTTP_ROUTE to the new metric attributes fix(instrumentation-http) Added ATTR_HTTP_ROUTE to the new metric attributes Oct 21, 2024
@pichlermarc
Copy link
Member

pichlermarc commented Oct 21, 2024

Hi @lionskape - thanks for reaching out. I looked into it and this is indeed a bug in this unreleased feature that has a few more layers to this bug that also involve span attributes and other metric attributes, so the fix is not as simple as it is proposed here.

I opened #5081 to take care of this.

@lionskape lionskape closed this Oct 22, 2024
@lionskape
Copy link
Author

lionskape commented Oct 22, 2024

@pichlermarc hello. Thank you for your attention. I will discard my PR in favor of your chagnes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants