-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[service] Internal counter metrics now have a _total
suffix in Prometheus
#12458
Comments
_total
suffix_total
suffix in Prometheus
cc @codeboten |
I had a play and it was introduced in v1.119.0, but it's still in v1.120.0 |
Not sure about that, since for Prometheus _total is expected for counters and both representations are valid. Though there are other problems like if you have a unit it is added to the name. That can also be disabled with a config. |
@bogdandrutu I see. Does that mean you would argue that dashboards breaking because of the change is the backend's responsibility for not properly parsing out this prefix? |
The "internal telemetry" page in the docs states that "A stable metric without a deprecated signature will not be deleted or renamed.". For this to not be breaking stability, we would need to argue that the "_total" suffix in the Prometheus exporter output is not part of the name of the metric, but a Prometheus-only indicator of the type of the metric. |
The suffix being appended is a result of end user configuration being passed in directly to the config package. A user that is using the default Prometheus configuration would not see this as a breaking change, as the We could possibly set |
As the person who found this issue (for what it's worth) having to add a single line config update to remove the suffix felt like a perfectly reasonable fix. This is a technical product for technical people, and the changelog gives clear instructions of breaking changes. It's true that the prometheus spec says counters |
@codeboten let's have at least document in all changelogs (119/120) what user should do / expect. I am ok to move forward with this "breaking" change. |
Fixes open-telemetry#12458 Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
) Fixes #12458 --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
Component(s)
service
What happened?
Describe the bug
Between v0.118.0 and v0.120.0, the name of internal counter metrics exposed through the Prometheus endpoint gained a
_total
suffix, breaking the stability of internal metrics.Steps to reproduce
Exercise the OTLP receiver (sending a span for example) with an explicitly configured Prometheus reader.
What did you expect to see?
Old output on the Prometheus endpoint:
What did you see instead?
New output on the Prometheus endpoint:
Collector version
v0.120.0
OpenTelemetry Collector configuration
Additional context
This was reported by Jon Bates on the CNCF Slack.
I believe this was introduced by #11611. The previous code for instantiating the Prometheus exporter explicitly added the
WithoutCounterSuffixes
option, but the new code now relies on the go-contrib config module to instantiate it based on the user's config.While the default
telemetry
config has a Prometheus reader with the correspondingwithout_type_suffix: true
option set, I believe that setting your own list of readers without specifyingwithout_type_suffix
will make it default to false, adding the_total
suffix to counter metrics.A workaround is to add
without_type_suffix: true
to theprometheus:
section.The text was updated successfully, but these errors were encountered: