prometheus / compliance

A set of tests to check compliance with various Prometheus interfaces
Apache License 2.0
127 stars 44 forks source link

Remote write compliance: NaN handling #29

Open roidelapluie opened 3 years ago

roidelapluie commented 3 years ago

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.

tomwilkie commented 3 years ago

@RichiH Does the exposition format support exporting a NaN? Do you have an example of how to do that?

brian-brazil commented 3 years ago

Yes, NaN for example.

roidelapluie commented 3 years ago

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.

RichiH commented 3 years ago

Testing for 0x7ff0000000000003 in addition to the other two seems prudent.