-
Notifications
You must be signed in to change notification settings - Fork 496
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
prometheus: add without_counter_suffixes
option
#1158
prometheus: add without_counter_suffixes
option
#1158
Conversation
d60598e
to
cc8545d
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #1158 +/- ##
=====================================
Coverage 49.4% 49.4%
=====================================
Files 164 164
Lines 20386 20416 +30
=====================================
+ Hits 10072 10105 +33
+ Misses 10314 10311 -3
☔ View full report in Codecov by Sentry. |
impl Collector { | ||
fn metric_type_and_name(&self, m: &data::Metric) -> Option<(MetricType, Cow<'static, str>)> { |
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.
Can we move this later when add_*
functions? It may save us one downcast/runtime type check. I do see this version is easier to understand and less repetitive though but wonder if the performance wise if it make sense to avoid repeating downcast when the type is Sum
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.
We could, but I don't think the downcasting has any noticeable perf impact. Could do a benchmark but threads like https://users.rust-lang.org/t/downcasting-overhead/69718/6 make it pretty clear.
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.
Doesn't seem to make a difference when I run quick bench, can re-assess if perf becomes an issue later.
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.
Sg. Thanks for checking!
Adds
This adds a method on the prometheus exporter config to not include counter suffixes as required in this spec change open-telemetry/opentelemetry-specification#3590
Merge requirement checklist
CHANGELOG.md
files updated for non-trivial, user-facing changes