-
Notifications
You must be signed in to change notification settings - Fork 172
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
OM 2.0: Consider relaxing the requirement for counters timeseries to have a _total suffix #282
Comments
I'm very much in favor for this one :) I can see another downside to not having the suffix: Prometheus today relies on the suffix to provide query annotations, like "You shouldn't use delta() with counters!!!". We would need to think of another strategy there, but I think we're already covering it somewhere else :) |
I think this needs more changes. OM v1 requires the following:
By just stating that the _total suffix is optional, we would make the following valid:
This is notably different from the old state of things, which was either
or
I also would like to note that the OM decision to not include the _total suffix in the metadata lines meant that existing established patterns became invalid (e.g. the infamous collision between
I think it would be easiest to go back to having the same nome in the metrics lines and in the metadata lines. |
Note that a counter often has two time series with different names
This is worse with histograms or summaries, where we have even more time series. |
If Classic histograms and summaries will stay as they are, of course. This was also the case with the old text format. Those suffixes also have been mandatory always. The OM intention was to make _total mandatory, and then all those changes make sense. But if we decide to not make it mandatory, then also those other decisions don't make sense anymore. |
Also, note #283 which solves the suffix problems for summaries and classic histograms. |
The 1.0 specification for counters reads:
I propose this should be changed to
SHOULD have the suffix "_total"
for 2.0.It is a best practice in Prometheus to suffix counters with _total, but other libraries, such as OpenTelemetry, include counters without a _total suffix. It is much nicer to be able to query for
rate({"my.counter"}[5m])
thanrate({"my.counter_total"}[5m])
for a metric defined as "my.counter".The text was updated successfully, but these errors were encountered: