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

Convert UpDownCounters to Prometheus gauges #3358

Merged
merged 3 commits into from Oct 19, 2022

Conversation

dashpole
Copy link
Contributor

Fixes #3353

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

OpenTelemetry Sums follows this logic:

  • If the aggregation temporality is cumulative and the sum is monotonic, it MUST be converted to a Prometheus Counter.
  • If the aggregation temporality is cumulative and the sum is non-monotonic, it MUST be converted to a Prometheus Gauge.

@dashpole dashpole added bug Something isn't working pkg:exporter:prometheus Related to the Prometheus exporter package labels Oct 18, 2022
@codecov
Copy link

codecov bot commented Oct 18, 2022

Codecov Report

Merging #3358 (483b1a5) into main (6c0a7c4) will increase coverage by 0.0%.
The diff coverage is 100.0%.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #3358   +/-   ##
=====================================
  Coverage   77.8%   77.8%           
=====================================
  Files        164     164           
  Lines      11278   11282    +4     
=====================================
+ Hits        8778    8788   +10     
+ Misses      2303    2297    -6     
  Partials     197     197           
Impacted Files Coverage Δ
exporters/prometheus/exporter.go 81.8% <100.0%> (+0.4%) ⬆️
exporters/jaeger/jaeger.go 91.1% <0.0%> (+0.8%) ⬆️
sdk/trace/batch_span_processor.go 81.9% <0.0%> (+1.7%) ⬆️

CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
@MrAlias MrAlias merged commit 430f558 into open-telemetry:main Oct 19, 2022
@MrAlias MrAlias mentioned this pull request Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pkg:exporter:prometheus Related to the Prometheus exporter package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UpDown Counters should become prometheus gauges
3 participants