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

Add _total suffixes to prometheus counters #3360

Merged
merged 1 commit into from
Oct 19, 2022

Conversation

dashpole
Copy link
Contributor

@dashpole dashpole commented Oct 18, 2022

Fixes #3359

Spec: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/data-model.md#sums-1

Monotonic Sum metric points MUST have _total added as a suffix to the metric name.

@dashpole dashpole added the pkg:exporter:prometheus Related to the Prometheus exporter package label Oct 18, 2022
@codecov
Copy link

codecov bot commented Oct 18, 2022

Codecov Report

Merging #3360 (5d5b49f) into main (715631d) will decrease coverage by 0.1%.
The diff coverage is 100.0%.

❗ Current head 5d5b49f differs from pull request most recent head bb230cd. Consider uploading reports for the commit bb230cd to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #3360     +/-   ##
=======================================
- Coverage   77.9%   77.7%   -0.2%     
=======================================
  Files        164     164             
  Lines      11345   11264     -81     
=======================================
- Hits        8847    8763     -84     
- Misses      2301    2303      +2     
- Partials     197     198      +1     
Impacted Files Coverage Δ
exporters/prometheus/exporter.go 80.0% <100.0%> (-3.1%) ⬇️
sdk/trace/batch_span_processor.go 80.2% <0.0%> (-1.8%) ⬇️
sdk/resource/env.go 93.0% <0.0%> (-1.0%) ⬇️
baggage/baggage.go 97.3% <0.0%> (-0.1%) ⬇️
sdk/metric/internal/sum.go 100.0% <0.0%> (ø)
exporters/prometheus/config.go 100.0% <0.0%> (ø)
sdk/metric/pipeline.go 93.9% <0.0%> (+0.4%) ⬆️

exporters/prometheus/exporter.go Show resolved Hide resolved
@dashpole dashpole marked this pull request as ready for review October 19, 2022 18:11
@MrAlias MrAlias added this to the Metric v0.33.0 milestone Oct 19, 2022
@MrAlias MrAlias merged commit 1d9d4b2 into open-telemetry:main Oct 19, 2022
@MrAlias MrAlias mentioned this pull request Oct 19, 2022
@dashpole dashpole deleted the prom_counter_total branch October 20, 2022 14:23
aramase added a commit to aramase/secrets-store-csi-driver that referenced this pull request May 9, 2023
For prometheus counters, by default they're appending _total if it's
monotonic counter. Removing the total_ prefix as it's redundant in the
name (xref: open-telemetry/opentelemetry-go#3360).
This is a breaking change.

Signed-off-by: Anish Ramasekar <[email protected]>
aramase added a commit to aramase/secrets-store-csi-driver that referenced this pull request May 9, 2023
For prometheus counters, by default they're appending _total if it's
monotonic counter. Removing the total_ prefix as it's redundant in the
name (xref: open-telemetry/opentelemetry-go#3360).
This is a breaking change.

Signed-off-by: Anish Ramasekar <[email protected]>
aramase added a commit to aramase/secrets-store-csi-driver that referenced this pull request May 10, 2023
For prometheus counters, by default they're appending _total if it's
monotonic counter. Removing the total_ prefix as it's redundant in the
name (xref: open-telemetry/opentelemetry-go#3360).
This is a breaking change.

Signed-off-by: Anish Ramasekar <[email protected]>
aramase added a commit to aramase/secrets-store-csi-driver that referenced this pull request May 18, 2023
For prometheus counters, by default they're appending _total if it's
monotonic counter. Removing the total_ prefix as it's redundant in the
name (xref: open-telemetry/opentelemetry-go#3360).
This is a breaking change.

Signed-off-by: Anish Ramasekar <[email protected]>
k8s-ci-robot pushed a commit to kubernetes-sigs/secrets-store-csi-driver that referenced this pull request May 19, 2023
* chore: update otel to v0.38.1 and update metrics

Signed-off-by: Anish Ramasekar <[email protected]>

* drop the total_ prefix from the metric name

For prometheus counters, by default they're appending _total if it's
monotonic counter. Removing the total_ prefix as it's redundant in the
name (xref: open-telemetry/opentelemetry-go#3360).
This is a breaking change.

Signed-off-by: Anish Ramasekar <[email protected]>

* chore: bump k8s deps to v1.26.4

Signed-off-by: Anish Ramasekar <[email protected]>

* skip lint for atomic writer files

Signed-off-by: Anish Ramasekar <[email protected]>

* update histogram boundaries

Signed-off-by: Anish Ramasekar <[email protected]>

* collect metrics as part of CI

Signed-off-by: Anish Ramasekar <[email protected]>

* validate metrics as part of e2e

Signed-off-by: Anish Ramasekar <[email protected]>

---------

Signed-off-by: Anish Ramasekar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg:exporter:prometheus Related to the Prometheus exporter package
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Prometheus counters should have a _total suffix appended.
3 participants