Update native_histograms.md#2650
Conversation
The CounterResetHint should ideally be set to CounterReset rather than UnknownCounterReset. Signed-off-by: Shashank vimal <jamvimal706@gmail.com>
| The counter reset information of the synthetic zero sample is always set to | ||
| `CounterReset`. (TODO: Currently, Prometheus probably sets it to | ||
| `UnknownCounterReset` for the first sample of a series, which is not wrong, but | ||
| `CounterResetHint` for the first sample of a series, which is not wrong, but |
There was a problem hiding this comment.
hi, thank you for taking interest, however CounterResetHint is not a valid value for the hint itself. Also the current code does indeed use UnknownCounterReset. This is because it's not actually setting any value which is the same: https://github.com/prometheus/prometheus/blob/24057883a14c597d70f46612e4b8fb5c9ad58d62/tsdb/head_append.go#L784
If you'd like to fix it, please start a PR in Prometheus to have it actually set CounterReset.
There was a problem hiding this comment.
The counter reset information of the synthetic zero sample is always set to CounterReset. This ensures that the initial zero value of a histogram, created for counter reset detection, is explicitly marked as a reset and not left ambiguous. is this correct?
There was a problem hiding this comment.
Yes. That's what's written there. This TODO is already tracked as prometheus/prometheus#16575 . No reason to update the TODO. It will be removed anyway once prometheus/prometheus#16575 is solved.
The CounterResetHint should ideally be set to CounterReset rather than UnknownCounterReset.
#issue
Native histograms: zero sample of created timestamp should have counter reset hint
#close #16575