opentelemetry-js
opentelemetry-js copied to clipboard
fix(instrumentation-http) Added ATTR_HTTP_ROUTE to the new metric attributes
trafficstars
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.
- [x] Bug fix (non-breaking change which fixes an issue)
- [x] 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
- [x] switch to stable-only mode in
@opentemetry/instrumentation-http - [x] add rpc metadata http route, check that metric attribute exists
- [x] remove rpc metadata http route, check that metric attribute does not exists
- [x] switch to dup mode in
@opentemetry/instrumentation-http - [x] add rpc metadata http route, check that metric attribute exists in both stable and old metrics
- [x] remove rpc metadata http route, check that metric attribute does not exists in both stable and old metrics
Checklist:
- [X] Followed the style guidelines of this project
- [ ] Unit tests have been added
- [ ] Documentation has been updated