-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 unit suffixes to prometheus metric names #3352
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dashpole
requested review from
jmacd,
MrAlias,
Aneurysm9,
evantorrie,
XSAM,
MadVikingGod,
pellared,
hanyuancheung and
dmathieu
as code owners
October 18, 2022 00:24
dashpole
force-pushed
the
unit_in_name
branch
from
October 18, 2022 00:25
b78ae28
to
647a841
Compare
dashpole
added
the
pkg:exporter:prometheus
Related to the Prometheus exporter package
label
Oct 18, 2022
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3352 +/- ##
=======================================
- Coverage 77.9% 77.9% -0.1%
=======================================
Files 164 164
Lines 11348 11363 +15
=======================================
+ Hits 8850 8861 +11
- Misses 2301 2305 +4
Partials 197 197
|
dashpole
force-pushed
the
unit_in_name
branch
from
October 18, 2022 14:13
647a841
to
9f14c51
Compare
MrAlias
reviewed
Oct 18, 2022
MrAlias
approved these changes
Oct 18, 2022
dashpole
force-pushed
the
unit_in_name
branch
2 times, most recently
from
October 19, 2022 18:24
ba437f1
to
68a17ab
Compare
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
dashpole
force-pushed
the
unit_in_name
branch
from
October 19, 2022 18:29
68a17ab
to
a7c8fee
Compare
MadVikingGod
approved these changes
Oct 19, 2022
Aneurysm9
approved these changes
Oct 19, 2022
using
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #3288
This adds a new option,
WithoutUnits()
that disables this behavior for all metrics, and maintains the status quo.I've opted to only rename units we explicitly support in our units package, rather than a more complete set like the collector does. I've also opted not to try and convert milliseconds to seconds, as the conversion (dividing by 1000) won't be straightforward with exponential histograms.
Open Question: Is
1
only applicable to ratios and fractions, or does it apply to any unitless metric? I was told that it only applies to ratios and fractions in the collector version of this. The spec says:But I can't tell if there are metrics which don't fall into either category and can use
1
without being a ratio.