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: remove metric units that are interpreted as ratios #49

Merged
merged 1 commit into from
Oct 5, 2023

Conversation

iand
Copy link
Contributor

@iand iand commented Oct 5, 2023

Metrics with a unit of "1" are interpreted as ratios by the prometheus exporter, which has the side effect of appending _ratio to the metric name. This is supposed to only be done for gauges but is actually applied to counters too. See https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/translator/prometheus for the transformations applied by the prometheus exporter. Since we were using "1" for dimensionless counts I have simply removed the units.

This PR also hooks up the SentMessages, SentMessageErrors, SentRequests, SentRequestErrors, OutboundRequestLatency and SentBytes DHT metrics.

@iand
Copy link
Contributor Author

iand commented Oct 5, 2023

Failed test is #48

@iand iand merged commit f9b6f32 into main Oct 5, 2023
@iand iand deleted the fix-metric-units branch October 5, 2023 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants