prometheus/tsdb/docs
Carrie Edwards abb5a2f947
Add histogram chunk encoding with Start Timestamp support (#18609)
* Add histogram chunk encoding with Start Timestamp support

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Update documentation

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Add more tests

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Fix for appendHistogram

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Linting

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Fix start timestamp for histogram samples in TestCompactingChunkSeriesMerger

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Refactor and reduce code duplication

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Move counter reset hint bits into sample count field

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Fix bug with counter reset header

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Clean up docs

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Address feedback

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Lint

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Refactor to use generic appenders

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Update to include changes to histogram appenders

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Address feedback

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* tsdb: add histograms-st-encoding feature flag (#18912)

* tsdb: add histograms-st-encoding feature flag

Decouple the ST-capable histogram chunk encodings (EncHistogramST,
EncFloatHistogramST) from the xor2-encoding feature flag and gate them
behind a new histograms-st-encoding flag instead. Previously
--enable-feature=xor2-encoding turned on both the float XOR2 encoding
and the histogram ST encodings via a single useXOR2 boolean; that
conflated two independent on-disk formats and made it impossible to opt
into one without the other.

ValueType.ChunkEncoding and NewChunk now take separate useXOR2 and
useHistogramST flags. Dispatch only consumes the relevant flag per
value type; data-driven callers that gate on actual ST presence in the
samples (storage/series.go, tsdb/querier.go, tsdb/chunks/chunks.go)
pass hasST for both. tsdb.Options gains EnableHistogramSTEncoding;
tsdb.HeadOptions gains a matching atomic.Bool. The new flag is
propagated through chunkOpts/headAppenderBase and read at every site
that currently reads EnableXOR2Encoding (head append v1/v2, head_wal
WAL/WBL replay, ooo_head_read).

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: George Krajcsovits <krajorama@users.noreply.github.com>

* Address feedback

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Fix histogram tests

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Fix histogram ST PromQL tests

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Fixes for promQL tests

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

---------

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: George Krajcsovits <krajorama@users.noreply.github.com>
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
2026-06-30 10:30:29 -07:00
..
format Add histogram chunk encoding with Start Timestamp support (#18609) 2026-06-30 10:30:29 -07:00
bstream.md improve bstream comments and doc (#9560) 2021-10-25 18:44:15 +05:30
refs.md Update godoc links and remove note about TSDB versioning (#10754) 2022-05-26 18:34:43 +10:00
usage.md Fix language in docs and comments (#14041) 2024-05-08 17:57:09 +02:00