Carrie Edwards
27b65ab2ad
Add histogram chunk encoding with Start Timestamp support
...
Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com >
2026-04-06 12:47:53 -07:00
George Krajcsovits
1ec24a3295
promqltest: use AppenderV2 in load command ( #18359 )
...
buf.build / lint and publish (push) Has been cancelled
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Compliance testing (push) Has been cancelled
CI / Build Prometheus for common architectures (0) (push) Has been cancelled
CI / Build Prometheus for common architectures (1) (push) Has been cancelled
CI / Build Prometheus for common architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (0) (push) Has been cancelled
CI / Build Prometheus for all architectures (1) (push) Has been cancelled
CI / Build Prometheus for all architectures (10) (push) Has been cancelled
CI / Build Prometheus for all architectures (11) (push) Has been cancelled
CI / Build Prometheus for all architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (3) (push) Has been cancelled
CI / Build Prometheus for all architectures (4) (push) Has been cancelled
CI / Build Prometheus for all architectures (5) (push) Has been cancelled
CI / Build Prometheus for all architectures (6) (push) Has been cancelled
CI / Build Prometheus for all architectures (7) (push) Has been cancelled
CI / Build Prometheus for all architectures (8) (push) Has been cancelled
CI / Build Prometheus for all architectures (9) (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
Sync repo files / repo_sync (push) Has been cancelled
* promqltest: use AppenderV2 in load command
Switch the PromQL test framework's load command from storage.Appender
to storage.AppenderV2 in appendSample, appendCustomHistogram and
appendTill. ST is set to 0 (unknown) for now; a follow-up will add
per-sample ST specification in load statements.
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
Coded with Claude Sonnet 4.6.
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* promqltest: fix unchecked Rollback error
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
Coded with Claude Sonnet 4.6.
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
---------
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
2026-03-25 11:09:41 +01:00
Julien
cfcc862182
Merge pull request #18353 from roidelapluie/roidelapluie/xor2app
...
tsdb/chunkenc: optimise XOR2 and varbit hot paths
2026-03-25 10:57:44 +01:00
Julien Pivotto
7a1a5e285f
chunkenc: add extra tests
...
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com >
2026-03-25 09:59:12 +01:00
Julien Pivotto
d8607cbd9b
tsdb/chunkenc: optimise XOR2 and varbit hot paths
...
Use writeBitsFast instead of writeBits in putVarbitInt/putVarbitUint,
combining prefix and value into a single call per bucket. Inline the
common fast paths in XOR2 Append to avoid encodeJoint and putVarbitInt
calls for the typical dod=0 and 13-bit dod cases.
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com >
2026-03-25 09:09:46 +01:00
George Krajcsovits
9670de1c35
Revert "annotations: add warning for ineffective sort in range queries ( #16628 )" ( #18357 )
...
buf.build / lint and publish (push) Has been cancelled
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Compliance testing (push) Has been cancelled
CI / Build Prometheus for common architectures (0) (push) Has been cancelled
CI / Build Prometheus for common architectures (1) (push) Has been cancelled
CI / Build Prometheus for common architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (0) (push) Has been cancelled
CI / Build Prometheus for all architectures (1) (push) Has been cancelled
CI / Build Prometheus for all architectures (10) (push) Has been cancelled
CI / Build Prometheus for all architectures (11) (push) Has been cancelled
CI / Build Prometheus for all architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (3) (push) Has been cancelled
CI / Build Prometheus for all architectures (4) (push) Has been cancelled
CI / Build Prometheus for all architectures (5) (push) Has been cancelled
CI / Build Prometheus for all architectures (6) (push) Has been cancelled
CI / Build Prometheus for all architectures (7) (push) Has been cancelled
CI / Build Prometheus for all architectures (8) (push) Has been cancelled
CI / Build Prometheus for all architectures (9) (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
Stale Check / stale (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
This reverts commit 3f80815e1b .
2026-03-24 16:33:38 +01:00
Bojun Kim
3f80815e1b
annotations: add warning for ineffective sort in range queries ( #16628 )
...
* feat(annotations): add warning for ineffective sort in range queries
Signed-off-by: poi1649 <bojun.kim@deliveryhero.com >
* feat(annotations): add Warning for sort_by_label and sort_by_label_desc as well
Signed-off-by: poi1649 <bojun.kim@deliveryhero.com >
* fix formatting
Signed-off-by: poi1649 <bojun.kim@deliveryhero.com >
* Apply suggestion from @poi1649
Signed-off-by: Bojun Kim <bojun.kim@deliveryhero.com >
* Apply suggestion from @poi1649
Signed-off-by: Bojun Kim <bojun.kim@deliveryhero.com >
* Update annotations.go
Signed-off-by: Bojun Kim <bojun.kim@deliveryhero.com >
* Update annotations.go
Signed-off-by: Bojun Kim <bojun.kim@deliveryhero.com >
* Update annotations.go
Signed-off-by: Bojun Kim <bojun.kim@deliveryhero.com >
* adjust formatting
Signed-off-by: poi1649 <bojun.kim@deliveryhero.com >
---------
Signed-off-by: poi1649 <bojun.kim@deliveryhero.com >
Signed-off-by: Bojun Kim <bojun.kim@deliveryhero.com >
2026-03-24 13:00:36 +01:00
Pierluigi Lenoci
afe0547899
promtool: redirect debug output to stderr ( #18346 )
...
The debug flag in `promtool test rules` writes diagnostic output
using fmt.Printf to stdout, which can interfere with machine-parseable
output (e.g. JUnit XML via --junit-output) and piped workflows.
Redirect all DEBUG lines to stderr using fmt.Fprintf(os.Stderr, ...),
consistent with the existing error output pattern already present in
the file (line 78).
Signed-off-by: Pierluigi Lenoci <pierluigi.lenoci@gmail.com >
2026-03-24 12:12:54 +01:00
Rushabh Mehta
df61021436
tsdb: Add series_state.json file to wal/ directory to track state ( #18303 )
...
buf.build / lint and publish (push) Has been cancelled
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Compliance testing (push) Has been cancelled
CI / Build Prometheus for common architectures (0) (push) Has been cancelled
CI / Build Prometheus for common architectures (1) (push) Has been cancelled
CI / Build Prometheus for common architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (0) (push) Has been cancelled
CI / Build Prometheus for all architectures (1) (push) Has been cancelled
CI / Build Prometheus for all architectures (10) (push) Has been cancelled
CI / Build Prometheus for all architectures (11) (push) Has been cancelled
CI / Build Prometheus for all architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (3) (push) Has been cancelled
CI / Build Prometheus for all architectures (4) (push) Has been cancelled
CI / Build Prometheus for all architectures (5) (push) Has been cancelled
CI / Build Prometheus for all architectures (6) (push) Has been cancelled
CI / Build Prometheus for all architectures (7) (push) Has been cancelled
CI / Build Prometheus for all architectures (8) (push) Has been cancelled
CI / Build Prometheus for all architectures (9) (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
Sync repo files / repo_sync (push) Has been cancelled
* Add series_state.json file creation and updation logic.
Signed-off-by: Rushabh Mehta <mehtarushabh2005@gmail.com >
* Make comments follow the guidelines.
Signed-off-by: Rushabh Mehta <mehtarushabh2005@gmail.com >
* Fix linter complaints
Signed-off-by: Rushabh Mehta <mehtarushabh2005@gmail.com >
* Put PR behind feature flag fast-startup
Signed-off-by: Rushabh Mehta <mehtarushabh2005@gmail.com >
* Marshal updated information to file directly
Signed-off-by: Rushabh Mehta <mehtarushabh2005@gmail.com >
* Fix linter failures
Signed-off-by: Rushabh Mehta <mehtarushabh2005@gmail.com >
* Move series state code from head.go to head_wal.go
Signed-off-by: Rushabh Mehta <mehtarushabh2005@gmail.com >
* Fix nits
Signed-off-by: Rushabh Mehta <mehtarushabh2005@gmail.com >
* Add unit test
Signed-off-by: Rushabh Mehta <mehtarushabh2005@gmail.com >
---------
Signed-off-by: Rushabh Mehta <mehtarushabh2005@gmail.com >
2026-03-23 20:46:04 -07:00
Bryan Boreham
7df2d13f00
Merge pull request #18282 from bboreham/agents-md
...
buf.build / lint and publish (push) Has been cancelled
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Compliance testing (push) Has been cancelled
CI / Build Prometheus for common architectures (0) (push) Has been cancelled
CI / Build Prometheus for common architectures (1) (push) Has been cancelled
CI / Build Prometheus for common architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (0) (push) Has been cancelled
CI / Build Prometheus for all architectures (1) (push) Has been cancelled
CI / Build Prometheus for all architectures (10) (push) Has been cancelled
CI / Build Prometheus for all architectures (11) (push) Has been cancelled
CI / Build Prometheus for all architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (3) (push) Has been cancelled
CI / Build Prometheus for all architectures (4) (push) Has been cancelled
CI / Build Prometheus for all architectures (5) (push) Has been cancelled
CI / Build Prometheus for all architectures (6) (push) Has been cancelled
CI / Build Prometheus for all architectures (7) (push) Has been cancelled
CI / Build Prometheus for all architectures (8) (push) Has been cancelled
CI / Build Prometheus for all architectures (9) (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
Stale Check / stale (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Add AGENTS.md file
2026-03-23 13:41:35 +00:00
Bryan Boreham
9bc2d73930
Address review feedback
...
Remove references to specific PR numbers.
Move "What Maintainers Notice" advice into other sections.
Thanks to @roidelapluie for suggestions.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com >
2026-03-23 08:30:39 +01:00
Bartlomiej Plotka
687b553bce
Merge pull request #18283 from prometheus/krajo/more-trim-tests
...
test(promql): add more test nh cases for fraction and trim
2026-03-22 23:09:05 +01:00
Julien
5b96e611dc
Merge pull request #18325 from roidelapluie/roidelapluie/xor2-with-st
...
Sync repo files / repo_sync (push) Has been cancelled
buf.build / lint and publish (push) Has been cancelled
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Compliance testing (push) Has been cancelled
CI / Build Prometheus for common architectures (0) (push) Has been cancelled
CI / Build Prometheus for common architectures (1) (push) Has been cancelled
CI / Build Prometheus for common architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (0) (push) Has been cancelled
CI / Build Prometheus for all architectures (1) (push) Has been cancelled
CI / Build Prometheus for all architectures (10) (push) Has been cancelled
CI / Build Prometheus for all architectures (11) (push) Has been cancelled
CI / Build Prometheus for all architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (3) (push) Has been cancelled
CI / Build Prometheus for all architectures (4) (push) Has been cancelled
CI / Build Prometheus for all architectures (5) (push) Has been cancelled
CI / Build Prometheus for all architectures (6) (push) Has been cancelled
CI / Build Prometheus for all architectures (7) (push) Has been cancelled
CI / Build Prometheus for all architectures (8) (push) Has been cancelled
CI / Build Prometheus for all architectures (9) (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Stale Check / stale (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
tsdb/chunkenc: port XOR2 performance improvements to ST-aware encoding
2026-03-20 16:09:40 +01:00
Julien Pivotto
3b2b42f681
tsdb/chunkenc: add writeBits benchmarks, clarify comments, and simplify encodeJoint
...
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com >
2026-03-20 14:54:48 +01:00
Julien
16876bab95
Merge pull request #18200 from roidelapluie/roidelapluie/retention-validation
...
Multiple fixes in retention configuration
2026-03-20 12:27:37 +01:00
Bartlomiej Plotka
166d20151c
Merge pull request #18323 from ogulcanaydogan/fix/16634-azure-system-managed-identity
...
buf.build / lint and publish (push) Has been cancelled
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Compliance testing (push) Has been cancelled
CI / Build Prometheus for common architectures (0) (push) Has been cancelled
CI / Build Prometheus for common architectures (1) (push) Has been cancelled
CI / Build Prometheus for common architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (0) (push) Has been cancelled
CI / Build Prometheus for all architectures (1) (push) Has been cancelled
CI / Build Prometheus for all architectures (10) (push) Has been cancelled
CI / Build Prometheus for all architectures (11) (push) Has been cancelled
CI / Build Prometheus for all architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (3) (push) Has been cancelled
CI / Build Prometheus for all architectures (4) (push) Has been cancelled
CI / Build Prometheus for all architectures (5) (push) Has been cancelled
CI / Build Prometheus for all architectures (6) (push) Has been cancelled
CI / Build Prometheus for all architectures (7) (push) Has been cancelled
CI / Build Prometheus for all architectures (8) (push) Has been cancelled
CI / Build Prometheus for all architectures (9) (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
discovery/azure: fix system managed identity when client_id is empty
2026-03-20 09:54:17 +01:00
Bartlomiej Plotka
776a71749a
Merge pull request #18314 from ridwanmsharif/scrape/fix-jitter
...
scrape: reset ticker to align target scrape times with offset and intervals
2026-03-20 09:52:32 +01:00
Ridwan Sharif
101ae73380
scrape: address comments on PR
...
Signed-off-by: Ridwan Sharif <ridwanmsharif@google.com >
2026-03-20 05:58:22 +00:00
Bartlomiej Plotka
a7ceef8815
Merge pull request #18326 from roidelapluie/roidelapluie/shepherd
...
Shepherd for 3.11
2026-03-20 06:46:13 +01:00
Julius Volz
df0504f338
Merge pull request #18328 from rickardsjp/histogram-docs
...
buf.build / lint and publish (push) Has been cancelled
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Compliance testing (push) Has been cancelled
CI / Build Prometheus for common architectures (0) (push) Has been cancelled
CI / Build Prometheus for common architectures (1) (push) Has been cancelled
CI / Build Prometheus for common architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (0) (push) Has been cancelled
CI / Build Prometheus for all architectures (1) (push) Has been cancelled
CI / Build Prometheus for all architectures (10) (push) Has been cancelled
CI / Build Prometheus for all architectures (11) (push) Has been cancelled
CI / Build Prometheus for all architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (3) (push) Has been cancelled
CI / Build Prometheus for all architectures (4) (push) Has been cancelled
CI / Build Prometheus for all architectures (5) (push) Has been cancelled
CI / Build Prometheus for all architectures (6) (push) Has been cancelled
CI / Build Prometheus for all architectures (7) (push) Has been cancelled
CI / Build Prometheus for all architectures (8) (push) Has been cancelled
CI / Build Prometheus for all architectures (9) (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
Sync repo files / repo_sync (push) Has been cancelled
Stale Check / stale (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
docs: clarify that histogram_avg/count/sum/stddev/stdvar are native-histogram-only
2026-03-19 16:46:55 +00:00
Julius Volz
c92085eecf
Merge pull request #18318 from linasm/autocomplete-for-ts-of-first-over-time
...
fix(UI): autocomplete for first_over_time and ts_of_first_over_time
2026-03-19 16:45:01 +00:00
Julien Pivotto
1064c26da2
Log retention changes
...
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com >
2026-03-19 17:21:45 +01:00
Julien Pivotto
e865bdd172
tsdb/chunkenc: avoid error allocation in readXOR2ControlFast and add decode tests
...
Change readXOR2ControlFast to return (uint8, bool) instead of (uint8, error)
to avoid allocating io.EOF on the fast path. Refactor encodeJoint to skip
computing vbits when the value is a stale NaN. Add TestXOR2DecodeFunctionsAcrossPadding
to exercise decodeValue, decodeValueKnownNonZero, and decodeNewLeadingTrailing
across all 64 bit-buffer alignments.
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com >
2026-03-19 17:00:31 +01:00
Domantas
2129702dff
perf(PromQL): allow inlining kahansum.Inc ( #18319 )
...
Signed-off-by: Domantas Jadenkus <djadenkus@gmail.com >
Signed-off-by: Domantas <djadenkus@gmail.com >
Co-authored-by: Linas Medžiūnas <linasm@users.noreply.github.com >
2026-03-19 15:31:20 +01:00
Linas Medziunas
4a400dc3df
fix(UI): autocomplete for first_over_time and ts_of_first_over_time
...
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com >
2026-03-19 16:10:23 +02:00
Jeremy Rickards
7a44a2ddc4
docs: regenerate PromQL function docs for UI
...
Signed-off-by: Jeremy Rickards <jeremy.rickards@sap.com >
2026-03-19 15:03:31 +01:00
Jeremy Rickards
530c4bfcc9
docs: clarify that histogram_avg/count/sum/stddev/stdvar are native-histogram-only
...
The docs for these functions previously described them as acting on
"each histogram sample," which was ambiguous. Add "native" to clarify
they only operate on native histogram samples, not classic histograms.
This distinction was originally documented but lost when the
experimental feature warnings were removed.
Signed-off-by: Jeremy Rickards <jeremy.rickards@sap.com >
2026-03-19 14:33:05 +01:00
Julien Pivotto
549c6ffd54
Shepherd for 3.11
...
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com >
2026-03-19 12:36:37 +01:00
Julien Pivotto
7176a6de91
tsdb/chunkenc: port XOR2 performance improvements to ST-aware encoding
...
Port the following optimizations from the roidelapluie/xor2 branch to
the ST-aware XOR2 implementation on main:
bstream.go:
- Add writeBitsFast() as a writeBits variant that handles the partial
last byte inline to avoid per-byte writeByte calls and writes
complete bytes directly to the stream slice; used only by XOR2 to
leave the shared writeBits unchanged for other encoders
- Add readXOR2ControlFast() for inlinable hot-path control decoding
that avoids buffer refills for the common 4-bit cases
- Add readUvarint()/readVarint() methods that use direct method calls
instead of io.ByteReader interface dispatch, reducing GC pressure
from interior pointer references in findObject
xor2.go:
- Switch all writeBits calls to writeBitsFast
- Use readXOR2ControlFast() + readXOR2Control() fallback in Next()
- Use it.br.readVarint()/readUvarint() instead of binary.ReadVarint/
ReadUvarint to avoid GC overhead from interface dispatch
- Add 3-bit fast path in decodeValue() to read the full value control
prefix in one buffer peek rather than up to three separate bit reads
- Add combined 1+sz bit fast path in decodeValueKnownNonZero() to
fold the control bit and value bits into a single buffer operation
- Add 11-bit combined read in decodeNewLeadingTrailing() to read
leading (5 bits) and sigbits (6 bits) together
- Pre-compute the value XOR delta in encodeJoint() and pass it to
writeVDeltaKnownNonZero(delta uint64) to avoid recomputation
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com >
2026-03-19 12:14:34 +01:00
Ogulcan Aydogan
7bbff490a3
discovery/azure: fix system managed identity when client_id is empty
...
When using ManagedIdentity authentication with system-assigned identity,
the client_id field is intentionally left empty. However, the current code
unconditionally sets options.ID = azidentity.ClientID(cfg.ClientID), which
passes an empty string instead of nil. The Azure SDK treats an empty
ClientID as a request for a user-assigned identity with an empty client ID,
rather than falling back to system-assigned identity.
Fix by only setting options.ID when cfg.ClientID is non-empty, matching the
pattern already used in storage/remote/azuread/azuread.go.
Fixes #16634
Signed-off-by: Ogulcan Aydogan <ogulcanaydogan@hotmail.com >
2026-03-19 10:49:17 +00:00
Jonas L.
a9d90952ba
Deprecate Hetzner Cloud server datacenter labels ( #17850 )
...
[hcloud.Server.Datacenter] is deprecated and will be removed after 1 July 2026. Use [hcloud.Server.Location] instead.
See https://docs.hetzner.cloud/changelog#2025-12-16-phasing-out-datacenters
Changes to Hetzner meta labels:
- `__meta_hetzner_datacenter`
- is deprecated for the role `robot` but kept for backward compatibility. Using `__meta_hetzner_robot_datacenter` is preferred.
- is deprecated for the role `hcloud` and will stop working after the 1 July 2026.
- `__meta_hetzner_hcloud_datacenter_location` label
- is deprecated but kept for backward compatibility, the same data is available in the [`hcloud.Server.Location`](https://pkg.go.dev/github.com/hetznercloud/hcloud-go/v2/hcloud#Server ) struct.
- using `__meta_hetzner_hcloud_location` is preferred.
- `__meta_hetzner_hcloud_datacenter_location_network_zone`
- is deprecated but kept for backward compatibility, the same data is available in the [`hcloud.Server.Location`](https://pkg.go.dev/github.com/hetznercloud/hcloud-go/v2/hcloud#Server ) struct.
- using `__meta_hetzner_hcloud_location_network_zone` is preferred.
- `__meta_hetzner_hcloud_location`
- replacement label for `__meta_hetzner_hcloud_datacenter_location`
- `__meta_hetzner_hcloud_location_network_zone`
- replacement label for `__meta_hetzner_hcloud_datacenter_location_network_zone`
- `__meta_hetzner_robot_datacenter`
- replacement label for `__meta_hetzner_datacenter` with the role `robot`.
Signed-off-by: Jonas Lammler <jonas.lammler@hetzner-cloud.de >
2026-03-19 11:25:01 +01:00
Bartlomiej Plotka
2ba3046c80
Merge float st-storage implementation (PROM-60) and initial xor2-encoding ( #18062 )
...
* feat(tsdb/chunkenc): add float chunk format with start timestamp support
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* optimize code path and layout
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* make new format usable in head
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* fix issue with seeking to last sample again
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* fix iterator benchmark for chunks not supporting ST
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* reduce footprint of the xoroptst chunk iterator object
It was 80 bytes with a lot of padding compared to the 56 bytes of the
original xor chunk iterator. Made it 64 bytes, tightly packed.
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* Fix benchmark expectations on ST in interator
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* add inclusive delta test case
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* make testcases independent of order
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* drop unused code
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* Drop commented out line
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* documentation
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* Small simplification in the doc
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* Add delta st inclusive test case for random vt
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* Switch to delta of difference of st to prev t
from delta of delta of st.
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* Write ST after T and V so we can write a single bit on the second sample
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* verify chunk sample len function
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* Reduce size of first st stored a little
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* test the case where st equals the t
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* add st equal t to bechmarks
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* test(chunkenc): test that appender can contonue chunks
Test that initializing a chunk appender from an existing chunk
works correctly.
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* fix(chunkenc): bug in initializing appender on existing chunk
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* Add cases with jitter in the start time as well
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* tsdb: ST-in-WAL: Counter implementation and benchmarks (#17671 )
Initial implementation of https://github.com/prometheus/prometheus/issues/17790 .
Only implements ST-per-sample for Counters. Tests and benchmarks updated.
Note: This increases the size of the RefSample object for all users, whether st-per-sample is turned on or not.
Signed-off-by: Owen Williams <owen.williams@grafana.com >
* refactor: sed enableStStorage/enableSTStorage
Signed-off-by: bwplotka <bwplotka@gmail.com >
* feat[scrape]: add ST parsing support to scrape AppenderV2 flow (#18103 )
Signed-off-by: bwplotka <bwplotka@gmail.com >
* feat(tsdb): change head opt EnableSTStorage to atomic (#18107 )
In downstream projects this needs to be set dynamically per tenant.
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* Merge pull request #18108 from prometheus/bwplotka/fix
scrape: add tests for ST appending; add warnings for ST feature flag users around _created drop
* refact(tsdb): trivial rename (#18109 )
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* fix(tsdb): missing passing head option to wal/wbl write (#18113 )
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* feat(tsdb): allow using ST capable XOR chunks - retain format on read (#18013 )
* feat(tsdb): allow appending to ST capable XOR chunk optionally
Only for float samples as of now. Supports for in-order and out-of-order
samples.
Make sure that on readout the ST capable chunks are returned automatically.
When the chunks are returned as is, this is trivially true.
When a chunk needs to be re-coded due to deletion (tombstone) markers,
we take the encoding of the original chunk.
When a chunk needs to be created from overlapping chunks, we observe
whether ST is zero or not and create the new chunk based on that.
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* fix test after merge
Signed-off-by: bwplotka <bwplotka@gmail.com >
* feat: RW2 sending ST support
Signed-off-by: bwplotka <bwplotka@gmail.com >
tmp
Signed-off-by: bwplotka <bwplotka@gmail.com >
* tests: test ST in a cheapest way possible
Signed-off-by: bwplotka <bwplotka@gmail.com >
* tests: add bench CLI recommended invokations
Signed-off-by: bwplotka <bwplotka@gmail.com >
* fixed tests after rebase
Signed-off-by: bwplotka <bwplotka@gmail.com >
* feat(chunkenc): replace xoroptst chunk encoding with xor2
XOR2 is based on https://github.com/prometheus/prometheus/pull/18238
With additional ST support.
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* feat: add compliance RW sender test for agent
Signed-off-by: bwplotka <bwplotka@gmail.com >
* feat(agent): add support for appending ST
Signed-off-by: bwplotka <bwplotka@gmail.com >
* replace stray xoroptst words
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com >
* post merge conflict fixes
Signed-off-by: bwplotka <bwplotka@gmail.com >
* feat(tsdb): register st_storage in feature API
Register the st-storage feature flag in the feature registry via
the TSDB options, consistent with how other TSDB features like
exemplar_storage and delayed_compaction are registered.
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
Coded with Claude Sonnet 4.6.
* Document xor2-encoding feature flag
Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com >
* Add xor2-encoding feature flag
Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com >
* Update CHANGELOG
Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com >
* Fix linting
Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com >
* Remove setting of xor2 encoding option in db open
Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com >
* Fix tests
Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com >
* Fix linting
Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com >
* Update feature flag description
Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com >
* Update comments and feature flag description
Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com >
* Update documentation for st-storage feature
Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com >
* st: disconnect st-storage with xor2-encoding given planned experiments (#18316 )
* st: disconnect st-storage with xor2-encoding given planned experiments
Signed-off-by: bwplotka <bwplotka@gmail.com >
* Update docs/feature_flags.md
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com >
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com >
* Update docs/feature_flags.md
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com >
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com >
* Update docs/feature_flags.md
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com >
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com >
* Update docs/feature_flags.md
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com >
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com >
---------
Signed-off-by: bwplotka <bwplotka@gmail.com >
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com >
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com >
---------
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
Signed-off-by: Ganesh Vernekar <ganesh.vernekar@reddit.com >
Signed-off-by: Bryan Boreham <bjboreham@gmail.com >
Signed-off-by: Aleksandr Smirnov <5targazer@mail.ru >
Signed-off-by: Mohammad Abbasi <mohammad.v184@gmail.com >
Signed-off-by: matt-gp <small_minority@hotmail.com >
Signed-off-by: Ian Kerins <git@isk.haus >
Signed-off-by: SuperQ <superq@gmail.com >
Signed-off-by: dependabot[bot] <support@github.com >
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
Signed-off-by: ffgan <sudoemt@gmail.com >
Signed-off-by: Patryk Prus <p@trykpr.us >
Signed-off-by: Owen Williams <owen.williams@grafana.com >
Signed-off-by: bwplotka <bwplotka@gmail.com >
Signed-off-by: 3Juhwan <13selfesteem91@naver.com >
Signed-off-by: Sammy Tran <sammyqtran@gmail.com >
Signed-off-by: Casie Chen <casie.chen@grafana.com >
Signed-off-by: Dan Cech <dcech@grafana.com >
Signed-off-by: kakabisht <kakabisht07@gmail.com >
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com >
Signed-off-by: Divyansh Mishra <divyanshmishra@Divyanshs-MacBook-Air-3.local >
Signed-off-by: Varun Chawla <varun_6april@hotmail.com >
Signed-off-by: Martin Valiente Ainz <64830185+tinitiuset@users.noreply.github.com >
Signed-off-by: Kyle Eckhart <kgeckhart@users.noreply.github.com >
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com >
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com >
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com >
Signed-off-by: Björn Rabenstein <github@rabenste.in >
Signed-off-by: beorn7 <beorn@grafana.com >
Signed-off-by: Sayuru <71478576+samaras3@users.noreply.github.com >
Signed-off-by: Matt <small_minority@hotmail.com >
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com >
Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com >
Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com >
Co-authored-by: Ganesh Vernekar <ganesh.vernekar@reddit.com >
Co-authored-by: Bryan Boreham <bjboreham@gmail.com >
Co-authored-by: Sasha <103973965+crush-on-anechka@users.noreply.github.com >
Co-authored-by: Mohammad Abbasi <mohammad.v184@gmail.com >
Co-authored-by: matt-gp <small_minority@hotmail.com >
Co-authored-by: Ian Kerins <git@isk.haus >
Co-authored-by: SuperQ <superq@gmail.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com >
Co-authored-by: Julien <291750+roidelapluie@users.noreply.github.com >
Co-authored-by: ffgan <sudoemt@gmail.com >
Co-authored-by: Patryk Prus <p@trykpr.us >
Co-authored-by: Ganesh Vernekar <ganeshvern@gmail.com >
Co-authored-by: Joe Adams <github@joeadams.io >
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Owen Williams <owen.williams@grafana.com >
Co-authored-by: 3Juhwan <13selfesteem91@naver.com >
Co-authored-by: Casie Chen <casie.chen@grafana.com >
Co-authored-by: Dan Cech <dcech@grafana.com >
Co-authored-by: hridyesh bisht <41201308+kakabisht@users.noreply.github.com >
Co-authored-by: zenador <zenador@users.noreply.github.com >
Co-authored-by: Divyansh Mishra <divyanshmishra@Divyanshs-MacBook-Air-3.local >
Co-authored-by: Varun Chawla <varun_6april@hotmail.com >
Co-authored-by: Martin Valiente Ainz <64830185+tinitiuset@users.noreply.github.com >
Co-authored-by: Kyle Eckhart <kgeckhart@users.noreply.github.com >
Co-authored-by: Matthieu MOREL <matthieu.morel35@gmail.com >
Co-authored-by: Linas Medžiūnas <linasm@users.noreply.github.com >
Co-authored-by: Björn Rabenstein <github@rabenste.in >
Co-authored-by: beorn7 <beorn@grafana.com >
Co-authored-by: Sayuru <71478576+samaras3@users.noreply.github.com >
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
Co-authored-by: Carrie Edwards <edwrdscarrie@gmail.com >
2026-03-19 10:51:40 +01:00
Bartlomiej Plotka
364d70812f
st: disconnect st-storage with xor2-encoding given planned experiments ( #18316 )
...
* st: disconnect st-storage with xor2-encoding given planned experiments
Signed-off-by: bwplotka <bwplotka@gmail.com >
* Update docs/feature_flags.md
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com >
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com >
* Update docs/feature_flags.md
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com >
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com >
* Update docs/feature_flags.md
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com >
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com >
* Update docs/feature_flags.md
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com >
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com >
---------
Signed-off-by: bwplotka <bwplotka@gmail.com >
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com >
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com >
2026-03-19 08:47:42 +00:00
Ridwan Sharif
8e8cd480cb
scrape: Introduce an offsetSeed option for deterministic scrape offset calculation and utilize it in tests
...
Signed-off-by: Ridwan Sharif <ridwanmsharif@google.com >
2026-03-17 20:16:05 +00:00
Ridwan Sharif
695db71c68
scrape: add test for distribution of scrapes
...
Signed-off-by: Ridwan Sharif <ridwanmsharif@google.com >
2026-03-17 20:00:03 +00:00
Ridwan Sharif
caa250a29c
scrape: reset ticker to align target scrape times with offset and intervals
...
Signed-off-by: Ridwan Sharif <ridwanmsharif@google.com >
2026-03-17 17:49:02 +00:00
Arve Knudsen
fc1c60d9eb
tsdb: clear pooled objects before returning to sync.Pool ( #17895 )
...
Sync repo files / repo_sync (push) Has been cancelled
buf.build / lint and publish (push) Has been cancelled
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Compliance testing (push) Has been cancelled
CI / Build Prometheus for common architectures (0) (push) Has been cancelled
CI / Build Prometheus for common architectures (1) (push) Has been cancelled
CI / Build Prometheus for common architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (0) (push) Has been cancelled
CI / Build Prometheus for all architectures (1) (push) Has been cancelled
CI / Build Prometheus for all architectures (10) (push) Has been cancelled
CI / Build Prometheus for all architectures (11) (push) Has been cancelled
CI / Build Prometheus for all architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (3) (push) Has been cancelled
CI / Build Prometheus for all architectures (4) (push) Has been cancelled
CI / Build Prometheus for all architectures (5) (push) Has been cancelled
CI / Build Prometheus for all architectures (6) (push) Has been cancelled
CI / Build Prometheus for all architectures (7) (push) Has been cancelled
CI / Build Prometheus for all architectures (8) (push) Has been cancelled
CI / Build Prometheus for all architectures (9) (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Stale Check / stale (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Clear WAL replay pool objects before Put() to avoid retaining references
to Labels, Histograms, and other data that could prevent garbage
collection.
The following pools now properly clear their contents:
- wlReplaySeriesPool: clear Labels field
- wlReplaytStonesPool: clear intervals
- wlReplayExemplarsPool: clear Labels field
- wlReplayHistogramsPool: clear histogram pointers
- wlReplayFloatHistogramsPool: clear float histogram pointers
- wlReplayMetadataPool: clear metadata strings
- agent walReplaySeriesPool: clear Labels field
- agent walReplayHistogramsPool: clear histogram pointers
- agent walReplayFloatHistogramsPool: clear float histogram pointers
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
2026-03-17 15:18:44 +01:00
Linas Medžiūnas
c532b658e4
histograms: BenchmarkFloatHistogramAdd ( #18248 )
...
* BenchmarkFloatHistogramAdd
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com >
* Format
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com >
---------
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com >
2026-03-17 15:07:56 +01:00
Bartlomiej Plotka
a02e20d98e
Merge branch 'main' into feature/start-time
...
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com >
2026-03-17 13:06:25 +01:00
avilevy18
bdfb3fc232
scrape: add option to manager to allow scraping at shutdown; add initial offset option ( #18067 )
...
* Adding scape on shutdown
Signed-off-by: avilevy <avilevy@google.com >
* scrape: replace skipOffsetting to make the test offset deterministic instead of skipping it entirely
Signed-off-by: avilevy <avilevy@google.com >
* renamed calculateScrapeOffset to getScrapeOffset
Signed-off-by: avilevy <avilevy@google.com >
* test(scrape): refactor time-based manager tests to use synctest
Addresses PR feedback to remove flaky, time-based sleeping in the scrape manager tests.
Add TestManager_InitialScrapeOffset and TestManager_ScrapeOnShutdown to use the testing/synctest package, completely eliminating real-world time.Sleep delays and making the assertions 100% deterministic.
- Replaced httptest.Server with net.Pipe and a custom startFakeHTTPServer helper to ensure all network I/O remains durably blocked inside the synctest bubble.
- Leveraged the skipOffsetting option to eliminate random scrape jitter, making the time-travel math exact and predictable.
- Using skipOffsetting also safely bypasses the global singleflight DNS lookup in setOffsetSeed, which previously caused cross-bubble panics in synctest.
- Extracted shared boilerplate into a setupSynctestManager helper to keep the test cases highly readable and data-driven.
Signed-off-by: avilevy <avilevy@google.com >
* Clarify use cases in InitialScrapeOffset comment
Signed-off-by: avilevy <avilevy@google.com >
* test(scrape): use httptest for mock server to respect context cancellation
- Replaced manual HTTP string formatting over `net.Pipe` with `httptest.NewUnstartedServer`.
- Implemented an in-memory `pipeListener` to allow the server to handle `net.Pipe` connections directly. This preserves `synctest` time isolation without opening real OS ports.
- Added explicit `r.Context().Done()` handling in the mock HTTP handler to properly simulate aborted requests and scrape timeouts.
- Validates that the request context remains active and is not prematurely cancelled during `ScrapeOnShutdown` scenarios.
- Renamed `skipOffsetting` to `skipJitterOffsetting`.
- Addressed other PR comments.
Signed-off-by: avilevy <avilevy@google.com >
* tmp
Signed-off-by: bwplotka <bwplotka@gmail.com >
* exp2
Signed-off-by: bwplotka <bwplotka@gmail.com >
* fix
Signed-off-by: bwplotka <bwplotka@gmail.com >
* scrape: fix scrapeOnShutdown context bug and refactor test helpers
The scrapeOnShutdown feature was failing during manager shutdown because
the scrape pool context was being cancelled before the final shutdown
scrapes could execute. Fix this by delaying context cancellation
in scrapePool.stop() until after all scrape loops have stopped.
In addition:
- Added test cases to verify scrapeOnShutdown works with InitialScrapeOffset.
- Refactored network test helper functions from manager_test.go to
helpers_test.go.
- Addressed other comments.
Signed-off-by: avilevy <avilevy@google.com >
* Update scrape/scrape.go
Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com >
Signed-off-by: avilevy18 <105948922+avilevy18@users.noreply.github.com >
---------
Signed-off-by: avilevy <avilevy@google.com >
Signed-off-by: bwplotka <bwplotka@gmail.com >
Signed-off-by: avilevy18 <105948922+avilevy18@users.noreply.github.com >
Co-authored-by: bwplotka <bwplotka@gmail.com >
2026-03-17 10:02:11 +00:00
Bartlomiej Plotka
b1c4d235f1
Merge pull request #18311 from prometheus/cedwards/document-st-storage
...
Update documentation for st-storage feature
2026-03-17 10:42:55 +01:00
Bartlomiej Plotka
7e2b7e425c
Merge branch 'feature/start-time' into cedwards/document-st-storage
...
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com >
2026-03-17 06:21:05 +01:00
Bartlomiej Plotka
91353dae0a
Merge pull request #18276 from prometheus/cedwards/xor2-encoding-feature-flag
...
Add xor2-encoding feature flag
2026-03-16 22:11:22 +01:00
Carrie Edwards
870fdf71f1
Update documentation for st-storage feature
...
Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com >
2026-03-16 09:59:36 -07:00
mihir-dixit2k27
c669470f07
docs: add HTTP SD integrations cross-reference ( #18278 )
...
buf.build / lint and publish (push) Has been cancelled
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Compliance testing (push) Has been cancelled
CI / Build Prometheus for common architectures (0) (push) Has been cancelled
CI / Build Prometheus for common architectures (1) (push) Has been cancelled
CI / Build Prometheus for common architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (0) (push) Has been cancelled
CI / Build Prometheus for all architectures (1) (push) Has been cancelled
CI / Build Prometheus for all architectures (10) (push) Has been cancelled
CI / Build Prometheus for all architectures (11) (push) Has been cancelled
CI / Build Prometheus for all architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (3) (push) Has been cancelled
CI / Build Prometheus for all architectures (4) (push) Has been cancelled
CI / Build Prometheus for all architectures (5) (push) Has been cancelled
CI / Build Prometheus for all architectures (6) (push) Has been cancelled
CI / Build Prometheus for all architectures (7) (push) Has been cancelled
CI / Build Prometheus for all architectures (8) (push) Has been cancelled
CI / Build Prometheus for all architectures (9) (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
Sync repo files / repo_sync (push) Has been cancelled
Stale Check / stale (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
* docs: add HTTP SD integrations cross-reference
Signed-off-by: Mihir Dixit <dixitmihir1@gmail.com >
* docs: add HTTP SD integrations cross-reference to configuration.md
Signed-off-by: Mihir Dixit <dixitmihir1@gmail.com >
---------
Signed-off-by: Mihir Dixit <dixitmihir1@gmail.com >
2026-03-16 14:09:54 +01:00
Arve Knudsen
6b5c0b327a
tsdb: mmap histogram chunks during WAL replay ( #18306 )
...
* tsdb: mmap histogram chunks during WAL replay
The float sample path in processWALSamples calls mmapChunks when a new
chunk is created during WAL replay, but the histogram path was missing
this call. Without it, histogram head chunks accumulate as a linked
list in memory rather than being mmapped, causing unnecessary memory
growth during long WAL replays.
---------
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
2026-03-16 12:08:47 +00:00
Carrie Edwards
a4a17a77cd
Update comments and feature flag description
...
Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com >
2026-03-13 07:43:28 -07:00
Bryan Boreham
82563e31c2
More review feedback
...
Signed-off-by: Bryan Boreham <bjboreham@gmail.com >
2026-03-13 10:22:07 +00:00
Julius Volz
8b25b26a76
Merge pull request #18228 from prometheus/fix/tooltip-y-offset-drift
...
buf.build / lint and publish (push) Has been cancelled
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Compliance testing (push) Has been cancelled
CI / Build Prometheus for common architectures (0) (push) Has been cancelled
CI / Build Prometheus for common architectures (1) (push) Has been cancelled
CI / Build Prometheus for common architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (0) (push) Has been cancelled
CI / Build Prometheus for all architectures (1) (push) Has been cancelled
CI / Build Prometheus for all architectures (10) (push) Has been cancelled
CI / Build Prometheus for all architectures (11) (push) Has been cancelled
CI / Build Prometheus for all architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (3) (push) Has been cancelled
CI / Build Prometheus for all architectures (4) (push) Has been cancelled
CI / Build Prometheus for all architectures (5) (push) Has been cancelled
CI / Build Prometheus for all architectures (6) (push) Has been cancelled
CI / Build Prometheus for all architectures (7) (push) Has been cancelled
CI / Build Prometheus for all architectures (8) (push) Has been cancelled
CI / Build Prometheus for all architectures (9) (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Sync repo files / repo_sync (push) Has been cancelled
Stale Check / stale (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
UI: Fix tooltip Y-offset drift for multiple graph panels
2026-03-12 20:30:08 +00:00
Carrie Edwards
b49ad5fc4b
Update feature flag description
...
Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com >
2026-03-12 13:24:59 -07:00