-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 Stale NaN Values are Reported with 0 Value #26716
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
The receiver uses the It seems like correct behavior to not record a value when setting the NO_RECORDED_VALUE flag, right?
We need the metric to be present to allow prometheus exporters to work correctly. Setting the value to I'll see if @Aneurysm9 has any thoughts, but I'm leaning towards keeping the current behavior. |
Thanks @dashpole!
Right, this makes sense. I think the issue is that when using the |
The OTLP exporter should also be exporting the |
Ah, that's likely what is happening. Still, would it be better for the OTLP exporter to be emitting |
You could certainly write a custom processor. I don't know if it would be accepted in the contrib repo, but you could build it into your own collector to work around the issue until the backend handles the flag. |
It seems like the conclusion of this issue is that everything collector-related is functioning as intended, but some backends do not yet support the |
Agreed |
Component(s)
receiver/prometheus
What happened?
Description
If a Stale NaN value is returned from the Prometheus job, it is converted to a
NumberDataPoint
with value 0 in theprometheusreciever
Steps to Reproduce
prometheusreceiver
scrape that serverExpected Result
The metric should either not be present or that metric should have a value of
NaN
Actual Result
A misleading 0 datapoint is exported for the metric
Collector version
v0.81.0
Environment information
Environment
Compiler(if manually compiled): go 1.20.6
OpenTelemetry Collector configuration
No response
Log output
No response
Additional context
When the prometheusreceiver is converting the prometheus values to OTLP, it never sets a value on the NumberDataPoint (ref).
The text was updated successfully, but these errors were encountered: