compliance
compliance copied to clipboard
Remote write compliance: NaN handling
We currently have a test for staleness NaN's, but Prometheus' TSDB "user-facing" NaN's are well defined as well: 0x7ff8000000000001
(math.NaN()
).
We should add a test to verify that remote write clients only use that specific NaN value.
@RichiH Does the exposition format support exporting a NaN? Do you have an example of how to do that?
Yes, NaN
for example.
The exposition format support exporting NaN's, but in floats64 there are many different values that are NaN's. There are two values that can go over remote write currently: NaN 0x7ff8000000000001
and stale NaN 0x7ff0000000000002
. StaleNaN can not be exposed. Other NaN's should not be produced.
Testing for 0x7ff0000000000003
in addition to the other two seems prudent.