-
Notifications
You must be signed in to change notification settings - Fork 821
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
Add HTTP Server and Client duration Metrics in HTTP Node.js Instrumentation #3149
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3149 +/- ##
==========================================
+ Coverage 93.17% 93.24% +0.06%
==========================================
Files 196 196
Lines 6494 6541 +47
Branches 1371 1373 +2
==========================================
+ Hits 6051 6099 +48
+ Misses 443 442 -1
|
experimental/packages/opentelemetry-instrumentation-http/src/utils.ts
Outdated
Show resolved
Hide resolved
}; | ||
|
||
const startTime = hrTime(); | ||
let metricAttributes: MetricAttributes = utils.getIncomingRequestMetricAttributes(spanAttributes, { component: component }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
component
should already exist on spanAttributes
, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HTTP_SCHEME was not there, so I'm adding as part of this PR as well, it is required according to the spec.
https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/http.md#http-server-semantic-conventions
experimental/packages/opentelemetry-instrumentation-http/src/utils.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-instrumentation-http/src/utils.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution! LGTM
@dyladan let me know if there is something preventing this one to be merged so I can work on it. |
Nothing in particular I just haven't had time to review and saw open conversations. I'll take a peek and merge this now. |
All conversations appear to have been addressed just weren't marked resolved. |
Which problem is this PR solving?
Add HTTP Server and Client duration Metrics in HTTP Node.js Instrumentation.
Fixes #3148
Short description of the changes
Adding support for duration metrics for both incoming and outgoing HTTP request in HTTP instrumentation.
https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/semantic_conventions/http-metrics.md
Type of change
Please delete options that are not relevant.
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
Checklist: