Bartlomiej Plotka
9dc782bf2c
Merge pull request #18220 from prometheus/extended-test
...
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
tests(tsdb/wlog): Tighten watcher tail tests
2026-03-05 11:31:04 +01:00
Bartlomiej Plotka
d448f3f970
Merge pull request #18218 from prometheus/utilrecord
...
tests(util/testwal): Move WAL record generation to separate package for reuse
2026-03-05 10:07:57 +01:00
Matthieu MOREL
45b9329e68
chore: fix emptyStringTest issues from gocritic ( #18226 )
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com >
2026-03-04 08:24:50 +01:00
bwplotka
3678ff9042
tests(tsdb/wlog): Tighten watcher tail tests
...
Signed-off-by: bwplotka <bwplotka@gmail.com >
2026-03-03 13:06:16 +00:00
George Krajcsovits
feb741e470
Merge pull request #18215 from mmorel-35/gocritic
...
chore: fix httpNoBody issues from gocritic
2026-03-03 12:50:19 +01:00
bwplotka
596830ee72
tests(util/testwal): Move WAL record generation to separate package for reuse
...
Signed-off-by: bwplotka <bwplotka@gmail.com >
tmp
Signed-off-by: bwplotka <bwplotka@gmail.com >
2026-03-03 10:06:21 +00:00
Matthieu MOREL
026d284c43
chore: fix httpNoBody issues from gocritic
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com >
2026-03-02 20:06:30 +01:00
Julien Pivotto
8b4318ad34
util/runtime: cast Blocks to uint64 to fix type mismatch on different architectures
...
On some GOOS (e.g. dragonfly), statfs.Blocks is int64, which can
cause a type mismatch when multiplied with Bsize. Cast both operands to
uint64 explicitly.
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com >
2026-02-27 15:49:17 +01:00
Ganesh Vernekar
ccc3062521
Merge branch 'main' into codesome/merge-3.10
...
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com >
2026-02-25 17:33:06 -08:00
Julien
9d38077e50
Merge pull request #18080 from ldufr/ldufresne/retention-size-percentage
...
Add percentage based retention
2026-02-24 15:50:36 +01:00
Jérôme LOYET
696679e50c
Add storage.tsdb.retention.percentage config
...
Signed-off-by: Jérôme LOYET <822436+fatpat@users.noreply.github.com >
Signed-off-by: Laurent Dufresne <laurent.dufresne@grafana.com >
2026-02-24 15:27:45 +01:00
Matthieu MOREL
addc3dcb47
chore: enable staticcheck linter and update golangci-lint to 2.10.1
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com >
2026-02-18 15:58:16 +00:00
Julien Pivotto
7d0a39ac93
chore(lint): enable wg.Go
...
Since our minimum supported go version is now go 1.25, we can use wg.Go.
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com >
2026-02-17 15:21:51 +01:00
Ganesh Vernekar
0d59a920bc
Remove the goexperiment.synctest build tag
...
Signed-off-by: Ganesh Vernekar <ganesh.vernekar@reddit.com >
2026-02-11 13:53:10 -08:00
Martin Valiente Ainz
eb5a0e1eed
Refactor parse.go into an instance-based Parser interface
...
Signed-off-by: Martin Valiente Ainz <64830185+tinitiuset@users.noreply.github.com >
2026-02-11 11:21:49 +01:00
Martin Valiente Ainz
af16f35ad6
PromQL: Refactor parser to use instance configuration instead of global flags
...
Parser configuration is now per-engine/API/loader and no longer uses package-level flags, so behavior is consistent and tests don't rely on save/restore of global variables.
Signed-off-by: Martin Valiente Ainz <64830185+tinitiuset@users.noreply.github.com >
2026-02-11 11:16:04 +01:00
Sasha
1dcdb07d30
promql: use Kahan summation for Native Histograms ( #15687 )
...
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 / 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
As for float samples, Kahan summation is used for the `sum` and `avg` aggregation and for the respective `_over_time` functions.
Kahan summation is not perfect. This commit also adds tests that even Kahan summation cannot reliably pass.
These tests are commented out.
Note that the behavior might be different on other hardware platforms. We have to keep an eye on test failing on other hardware platforms and adjust them accordingly.
Signed-off-by: Aleksandr Smirnov <5targazer@mail.ru >
2026-02-08 00:52:22 +01:00
zenador
4321a5573c
Use custom annotation for histogram quantile monotonicity info to provide more details ( #15578 )
...
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 / 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
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com >
2026-02-05 18:35:48 +01:00
zenador
c0ad853750
promql: Make it possible to add custom details in annotations and summarise multiple of the same annotation ( #15577 )
...
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com >
Signed-off-by: zenador <zenador@users.noreply.github.com >
Co-authored-by: Björn Rabenstein <github@rabenste.in >
2026-02-03 15:12:02 +01:00
Bartlomiej Plotka
848b16d686
test: Add benchmark without storage + fix skipRecording mock feature ( #17987 )
...
* test: Add benchmark without storage
Signed-off-by: bwplotka <bwplotka@gmail.com >
make bench fair
Signed-off-by: bwplotka <bwplotka@gmail.com >
tmp
Signed-off-by: bwplotka <bwplotka@gmail.com >
* Apply suggestions from code review
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.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: Arve Knudsen <arve.knudsen@gmail.com >
2026-02-02 12:44:11 +00:00
Bartlomiej Plotka
9657c23c37
storage: optimized fanoutAppenderV2 ( #17976 )
...
* storage: add BenchmarkFanoutAppenderV2
Signed-off-by: bwplotka <bwplotka@gmail.com >
* fix: optimized fanoutAppenderV2
Signed-off-by: bwplotka <bwplotka@gmail.com >
* optimized more
Signed-off-by: bwplotka <bwplotka@gmail.com >
---------
Signed-off-by: bwplotka <bwplotka@gmail.com >
2026-02-02 07:04:30 +00:00
Bartlomiej Plotka
aa0f00efdf
tests(teststorage, api_test): Fix leaking readers; kill fake exemplar storage ( #17906 )
...
* tests(teststorage): Fix leaking readers; use TSDB exemplar storage instead of fake
Signed-off-by: bwplotka <bwplotka@gmail.com >
* switched to v1 exemplar flow for now
Signed-off-by: bwplotka <bwplotka@gmail.com >
---------
Signed-off-by: bwplotka <bwplotka@gmail.com >
2026-01-27 10:07:56 +00:00
Bartlomiej Plotka
0d116b0994
tests(teststorage): Close Storage in the helper ( #17902 )
...
Signed-off-by: bwplotka <bwplotka@gmail.com >
2026-01-23 08:41:35 +00:00
George Krajcsovits
21fb899c32
fix(teststorage/appender.go): TODO and Sample staleness check ( #17905 )
...
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 / 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
* fix(teststorage/appender.go): TODO and Sample staleness check
Allow different order of consecutive stale samples between the expected
and actual array for RequireEqual and RequireNotEqual by trying to
swap the expected side until it matches.
Also fix the definition of stale sample in the test, it's not only
float, but defined for native histograms as well.
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
* add unit tests
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
---------
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
2026-01-21 15:25:31 +00:00
Bartlomiej Plotka
04a3ef75f2
chore: remove testutil.T which is no longer needed since Go 1.13 ( #17903 )
...
testutil.T was needed before https://go.dev/doc/go1.13#testingpkgtesting
Now it's inconsistent and confusing, so let's kill it.
Signed-off-by: bwplotka <bwplotka@gmail.com >
2026-01-21 13:02:58 +00:00
Bartlomiej Plotka
664b255699
Merge pull request #17867 from prometheus/bwplotka/a2-scrape-1
...
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 / 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
refactor(appenderV2)[PART5a]: add AppendableV2 support to scrape loop + tests
2026-01-21 08:21:56 +00:00
Bryan Boreham
853572c1bf
Merge pull request #17830 from hritz220/util/strutil-enhance-test-coverage
...
util: enhance test coverage for strutil package
2026-01-20 11:43:41 +00:00
Julius Volz
1d3d98ed16
Merge pull request #17644 from prometheus/binop-fill-modifier
...
PromQL: Add `fill*()` binop modifiers to provide default values for missing series
2026-01-19 20:05:52 +01:00
Bartlomiej Plotka
c4b0da94db
Merge pull request #17835 from prometheus/bwplotka/a2-storage-support
...
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 / 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
feat(storage)[PART4b]: add AppenderV2 to the rest of storage.Storage implementations + mock exemplar fix
2026-01-16 13:04:14 +00:00
Julien Pivotto
66bb47ade6
fuzzing: fix artifact path and experimental parser flags
...
Fix two issues in fuzzing infrastructure:
- Correct artifact upload path from promql/testdata/fuzz to util/fuzzing/testdata/fuzz to match where Go stores crash artifacts
- Fix GetCorpusForFuzzParseExpr to preserve original parser flag values instead of always resetting them to false, which was disabling experimental features before actual fuzzing ran
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com >
2026-01-16 12:07:16 +01:00
bwplotka
f61a83bcd6
fix: appenderV2 mock exemplar appendErr injection before appending it
...
Signed-off-by: bwplotka <bwplotka@gmail.com >
2026-01-16 10:47:00 +00:00
bwplotka
1d3c6210f3
add extra fanout test
...
Signed-off-by: bwplotka <bwplotka@gmail.com >
2026-01-15 14:13:58 +00:00
Julius Volz
d3b6e61487
Put binop fill modifiers behind a feature flag
...
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 / 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
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
Signed-off-by: Julius Volz <julius.volz@gmail.com >
2026-01-15 11:18:48 +01:00
Bartlomiej Plotka
3374d2e56f
feat(teststorage)[PART4a]: Add AppendableV2 support for mock Appendable ( #17834 )
...
* feat(teststorage)[PART4a]: Add AppendableV2 support for mock Appendable
Signed-off-by: bwplotka <bwplotka@gmail.com >
* fix: adjusted AppenderV1 flow for reliability
Found in https://github.com/prometheus/prometheus/pull/17838 and by
Krajo comment
Signed-off-by: bwplotka <bwplotka@gmail.com >
* addressed comments
Signed-off-by: bwplotka <bwplotka@gmail.com >
* fix broken appV2 commit and rollback; added tests
Signed-off-by: bwplotka <bwplotka@gmail.com >
---------
Signed-off-by: bwplotka <bwplotka@gmail.com >
2026-01-14 13:48:33 +00:00
Julien Pivotto
de0a864b5c
Fuzzing: Move to go fuzzing
...
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com >
2026-01-12 12:59:10 +01:00
Ritik Shukla
f9242d4707
util: enhance test coverage for strutil package
...
- Added comprehensive edge case tests for SanitizeLabelName (10 cases)
- Added comprehensive edge case tests for SanitizeFullLabelName (15 cases)
- Added more test cases for link generation functions (4 additional cases)
- Fixed unicode test case: corrected expected underscores from 7 to 5
- Fixed digits test case: corrected expected output from '_____' to '_2345'
- Converted tests to table-driven format with named subtests
- Achieved 100% code coverage for the package
Signed-off-by: Ritik Shukla <ritikshukla@Ritiks-MacBook-Air.local >
2026-01-10 16:05:21 +05:30
Julius Hinze
22463b1e9f
tsdb: add support for OOO exemplars in CircularExemplarStorage ( #17469 )
...
* tsdb: add support for OOO exemplars in CircularExemplarStorage
Doubly linked exemplar storage resize.
Split exemplar buffer resize into shrink and grow functions.
Skip duplicate OOO exemplars, re-initialize emptied index after deleting its last exemplar.
Signed-off-by: Julius Hinze <julius.hinze@grafana.com >
2026-01-07 13:25:50 +01:00
Ben Kochie
e14795bbf4
Remove copyright date from headers ( #17785 )
...
Remove copyright dates from various files as part of [PROM-50].
[PROM-50]: https://github.com/prometheus/proposals/blob/main/proposals/0050-remove-copyright-dates.md
Signed-off-by: SuperQ <superq@gmail.com >
2026-01-05 13:46:21 +01:00
Bartlomiej Plotka
17e06dbab5
refactor(scrape)[PART2]: simplified scrapeLoop constructors & tests; add teststorage.Appendable mock ( #17631 )
...
* refactor(scrape): simplified scrapeLoop constructors & tests; add teststorage.Appender mock
Signed-off-by: bwplotka <bwplotka@gmail.com >
debug
* refactor(scrape): simplified newLoop even more
Signed-off-by: bwplotka <bwplotka@gmail.com >
* refactor(scrape): rename sl -> app, slApp -> app
Signed-off-by: bwplotka <bwplotka@gmail.com >
* fix TestScrapeLoopRun flakiness
Signed-off-by: bwplotka <bwplotka@gmail.com >
* fix lint
Signed-off-by: bwplotka <bwplotka@gmail.com >
* kill unused listSeriesSet code
Signed-off-by: bwplotka <bwplotka@gmail.com >
* fix closing to not panic
Signed-off-by: bwplotka <bwplotka@gmail.com >
* added extra benchmark for scrapeAndReport
Signed-off-by: bwplotka <bwplotka@gmail.com >
* added extra benchmark for restartLoops
Signed-off-by: bwplotka <bwplotka@gmail.com >
* addressed last comments
Signed-off-by: bwplotka <bwplotka@gmail.com >
* fix TestConcurrentAppender_ReturnsErrAppender naming
Signed-off-by: bwplotka <bwplotka@gmail.com >
* addressed small comments
Signed-off-by: bwplotka <bwplotka@gmail.com >
* refactor(scrape): ensure scrape config is reloaded; added test
Signed-off-by: bwplotka <bwplotka@gmail.com >
* addressed comments.
Signed-off-by: bwplotka <bwplotka@gmail.com >
---------
Signed-off-by: bwplotka <bwplotka@gmail.com >
2025-12-22 09:38:48 +00:00
Joshua Rogers
a155ad55a3
httputil: add Vary: Accept-Encoding and fix compression headers ( #17466 )
...
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 / 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
Push README to Docker Hub / Push README to Docker Hub (push) Has been cancelled
Push README to Docker Hub / Push README to quay.io (push) Has been cancelled
Stale Check / stale (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
- Emit `Vary: Accept-Encoding` in newCompressedResponseWriter so shared caches
key responses by content-coding. This prevents cache poisoning and
undecodable bytes when a compressed variant is cached and later served to a
client that didn't advertise support. (RFC 9110 §12.5.5 "Vary";
RFC 9111 §4.1 cache key & Vary)
- When selecting gzip/deflate, set `Content-Encoding` and delete any existing
`Content-Length` so Go's net/http can frame the message correctly
(chunked for HTTP/1.1; implicit for HTTP/2+). This avoids stale length
mismatches and related proxy/client issues.
Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com >
2025-12-21 10:15:35 +01:00
Julien Pivotto
a5671a002f
API: Add a /api/v1/features endpoint
...
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com >
2025-12-09 16:13:14 +01:00
Clark McCauley
9d508a4888
util: add +Inf bucket in MetricFamiliesToWriteRequest when not present ( #15864 )
...
* Add +Inf bucket in MetricFamiliesToWriteRequest if not present
Signed-off-by: Clark McCauley <clarkmccauley@gmail.com >
2025-11-11 12:43:04 +01:00
Ben Kochie
204249fcb5
Update golangci-lint ( #17478 )
...
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 / 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
* Update golangci-lint to v2.6.0
* Fixup various linting issues.
* Fixup deprecations.
* Add exception for `labels.MetricName` deprecation.
Signed-off-by: SuperQ <superq@gmail.com >
2025-11-05 13:47:34 +01:00
Ben Kochie
48956f60d7
Update modernize ( #17471 )
...
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 / 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
Apply additional Go modernize tool improvements.
Signed-off-by: SuperQ <superq@gmail.com >
2025-11-04 05:13:49 +00:00
Linas Medžiūnas
44df626620
promql (histograms): reconcile mismatched NHCB bounds ( #17278 )
...
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 / 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
Fixes #17255 .
The implementation happens mostly in the Add and Sub method, but the reconciliation works for all relevant operations. For example, you can now `rate` over a range wherein the custom bucket boundaries are changing.
Any custom bucket reconciliation is flagged with an info-level annotation.
---------
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com >
Signed-off-by: Linas Medžiūnas <linasm@users.noreply.github.com >
2025-10-18 01:03:52 +02:00
beorn7
ad7d1aed99
Phase out native histogram feature flag
...
The detailed plan for this is laid out in
https://github.com/prometheus/prometheus/issues/16572 .
This commit adds a global and local scrape config option
`scrape_native_histograms`, which has to be set to true to ingest
native histograms.
To ease the transition, the feature flag is changed to simply set the
default of `scrape_native_histograms` to true.
Further implications:
- The default scrape protocols now depend on the
`scrape_native_histograms` setting.
- Everywhere else, histograms are now "on by default".
Documentation beyond the one for the feature flag and the scrape
config are deliberately left out. See
https://github.com/prometheus/prometheus/pull/17232 for that.
Signed-off-by: beorn7 <beorn@grafana.com >
2025-10-15 14:50:52 +02:00
György Krajcsovits
c26a5390aa
perf(tsdb): reuse map of sample types to speed up head appender
...
While investigating +10% CPU in v3.7 release, found that ~5% is from
expanding the types map. Try reuse.
Also fix a linter error.
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
2025-10-06 21:44:34 +02:00
Bryan Boreham
0d3ec05056
Merge pull request #17043 from machine424/ffl
...
chore: allow seamless use of testing/synctest for >=go1.24
2025-09-30 12:11:12 +01:00
Jan Fajerski
c9e0e36701
Add comments clarifying why promql.Querylogger exists ( #17231 )
...
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 / 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
Sync repo files / repo_sync (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
And why we only have one implementation in this code base.
Fixes: https://github.com/prometheus/prometheus/issues/15869
Signed-off-by: Jan Fajerski <jfajersk@redhat.com >
2025-09-26 15:33:09 +01:00
machine424
365409d3be
chore: allow seamless use of testing/synctest for >=go1.24
...
Signed-off-by: machine424 <ayoubmrini424@gmail.com >
2025-09-19 22:48:25 +02:00