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

prometheus exporter: add units to metric names in TYPE and HELP comments #5718

Merged
merged 3 commits into from
Sep 1, 2023

Conversation

dashpole
Copy link
Contributor

@dashpole dashpole commented Aug 16, 2023

Fixes #5716

Changes:

  • ensures the _total suffix is always added after unit suffixes by trimming it before adding unit suffixes.
  • ensures the TYPE and HELP comments have the correct metric name, including unit suffixes.
  • Update unit tests to use seconds, as ratio (1) is not common.

@dashpole dashpole force-pushed the unit_in_names branch 9 times, most recently from 723dadb to a1ba5ec Compare August 16, 2023 20:57
@codecov
Copy link

codecov bot commented Aug 16, 2023

Codecov Report

Patch coverage is 100.00% of modified lines.

Files Changed Coverage
...xporter/prometheus/PrometheusMetricNameMapper.java 100.00%
.../opentelemetry/exporter/prometheus/Serializer.java 100.00%

📢 Thoughts on this report? Let us know!.

@dashpole dashpole marked this pull request as ready for review August 17, 2023 13:04
@dashpole dashpole requested a review from a team August 17, 2023 13:04
@dashpole dashpole force-pushed the unit_in_names branch 3 times, most recently from 805c189 to 44da63b Compare August 21, 2023 19:27
@jack-berg jack-berg merged commit 2e2c308 into open-telemetry:main Sep 1, 2023
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prometheus unit suffixes are not applied to TYPE and HELP
3 participants