-
Notifications
You must be signed in to change notification settings - Fork 847
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
feat(add-option-to-disable-instrumentation-http-metrics #5029
feat(add-option-to-disable-instrumentation-http-metrics #5029
Conversation
929bfe5
to
92d8647
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5029 +/- ##
==========================================
- Coverage 93.39% 93.27% -0.13%
==========================================
Files 46 317 +271
Lines 712 8194 +7482
Branches 120 1640 +1520
==========================================
+ Hits 665 7643 +6978
- Misses 47 551 +504 |
92d8647
to
ba4f654
Compare
ba4f654
to
d918ac6
Compare
@AkselAllas what about adding a view that uses a drop aggregation for all metrics from the new View({
meterName: '@opentelemetry/instrumentation-http',
aggregation: Aggregation.Drop()
}) |
@AkselAllas which errors are you getting? This sounds like there must be something wrong with either the SDK or the exporter. 🤔 |
@pichlermarc I am getting:
None of my own custom metrics are generating any errors, so I would prefer to not use these metrics. We don't use any of them either. Possibility of using View is also an option for me indeed. Thanks 🙇 |
I think currently instrumentation-http or any other instrumentations are definitely missing documenting that they even do this automatic reporting of metrics. When these metrics are left unused, they are just a cost for the end user. |
I'm sorry for the slow responses, but I'm not too familar with prometheus, so reading up on it and tinkering myself takes a lot of time. Ideally I'd need some some kind of reproducer that I can run myself to truly dig into the problem. It does look however, that there should be a way to use these metrics and without generating errors like this - disabling them via a view gets rid of the symptom but it looks like there's a need to fix an underlying problem. Would you mind opening an issue instead? 🤔 In the meantime, having a
@dyladan adds some docs about which metrics are exported over at #5026. |
@pichlermarc No problem. Thanks for the in-depth response! I'm 90% sure this error is related to me calling forceFlush at the end of all GCP Cloud Function calls, which I detailed in this otel-collector issue. At the moment I don't have time priority to differentiate why only instrumentation-http metric fails and create an issue with reproducible failure scenario. The reproduced case might be valid for legacy serverless scenarios anyhow. I will close this PR, instead I just recommend maintainers to write (and link example) about the suggested way of using View for dropping the metrics into instrumentation-http README. |
I am getting errors from instrumentation-http metrics. They are not exporting correctly and I have my own custom http metrics instead. I want to be able to turn them off.