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

Prometheus exporter: Non-monotonic sum should be converted to a prometheus gauge #3974

Open
dashpole opened this issue Dec 6, 2022 · 0 comments
Labels
enhancement New feature or request help wanted Good for taking. Extra help will be provided by maintainers pkg:OpenTelemetry.Exporter.Prometheus.AspNetCore Issues related to OpenTelemetry.Exporter.Prometheus.AspNetCore NuGet package

Comments

@dashpole
Copy link
Contributor

dashpole commented Dec 6, 2022

From the Prometheus spec for OTel sums:

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.
  • If the aggregation temporality is delta and the sum is monotonic, it SHOULD be converted to a cumulative temporality and become a Prometheus Sum. The following behaviors are expected:
    • The new data point type must be the same as the accumulated data point type.
    • The new data point's start time must match the time of the accumulated data point. If not, see detecting alignment issues.
  • Otherwise, it MUST be dropped.

The current implementation converts non-monotonic sums to counters. Instead, these should be converted to gauges.

@dashpole dashpole added the enhancement New feature or request label Dec 6, 2022
@cijothomas cijothomas added the pkg:OpenTelemetry.Exporter.Prometheus.AspNetCore Issues related to OpenTelemetry.Exporter.Prometheus.AspNetCore NuGet package label Jan 13, 2023
@reyang reyang added the help wanted Good for taking. Extra help will be provided by maintainers label May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Good for taking. Extra help will be provided by maintainers pkg:OpenTelemetry.Exporter.Prometheus.AspNetCore Issues related to OpenTelemetry.Exporter.Prometheus.AspNetCore NuGet package
Projects
None yet
Development

No branches or pull requests

3 participants