compliance icon indicating copy to clipboard operation
compliance copied to clipboard

Remote write compliance: NaN handling

Open roidelapluie opened this issue 3 years ago • 4 comments

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.

roidelapluie avatar May 25 '21 10:05 roidelapluie

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

tomwilkie avatar Jun 09 '21 09:06 tomwilkie

Yes, NaN for example.

brian-brazil avatar Jun 09 '21 10:06 brian-brazil

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.

roidelapluie avatar Jun 09 '21 10:06 roidelapluie

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

RichiH avatar Jun 09 '21 12:06 RichiH