1009 Commits

Author SHA1 Message Date
bwplotka
bbde4ae8ca funny e2ebench
Signed-off-by: bwplotka <bwplotka@gmail.com>
2026-02-26 11:40:08 +00:00
bwplotka
8f3a6020d8 Merge branch 'main' into st-main-sync2 2026-02-25 13:54:25 +00:00
George Krajcsovits
5d3f9ee39b
Merge pull request #17904 from linasm/trim_histogram
promql: Implement </ and >/ operators for trimming native histograms
2026-02-24 17:16:24 +01: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
Laurent Dufresne
971143edac Added Retention.Percentage to config file with runtime config reloading
Signed-off-by: Laurent Dufresne <laurent.dufresne@grafana.com>
2026-02-24 15:28:20 +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
bwplotka
56c46af6a6 Merge branch 'main' into st-f-main 2026-02-23 10:00:39 +00:00
Matt
ce30ae49f3
[FEATURE] AWS SD: Add Elasticache Role (#18099)
* AWS SD: Elasticache

This change adds Elasticache to the AWS SD.

Co-authored-by: Ben Kochie <superq@gmail.com>
Signed-off-by: Matt <small_minority@hotmail.com>

---------

Signed-off-by: Matt <small_minority@hotmail.com>
Co-authored-by: Ben Kochie <superq@gmail.com>
2026-02-22 15:56:03 +01:00
Bartlomiej Plotka
2c4afcdcdc
chore: Add consistent closing logging (#18119)
Signed-off-by: bwplotka <bwplotka@gmail.com>
2026-02-20 13:17:02 +00:00
Björn Rabenstein
b2e63376da
Merge pull request #18105 from mmorel-35/staticcheck
chore: enable staticcheck linter and update golangci-lint to 2.10.1
2026-02-19 12:44:00 +01:00
Linas Medžiūnas
5bd0d00f8c
PromQL: Add experimental histogram_quantiles variadic function (#17285)
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>
Co-authored-by: Björn Rabenstein <github@rabenste.in>
Co-authored-by: beorn7 <beorn@grafana.com>
2026-02-18 17:32:29 +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
Bartlomiej Plotka
8d8371244b
Merge pull request #18108 from prometheus/bwplotka/fix
scrape: add tests for ST appending; add warnings for ST feature flag users around _created drop
2026-02-18 12:26:17 +00:00
Bartlomiej Plotka
23d2ab447e
feat[scrape]: add ST parsing support to scrape AppenderV2 flow (#18103)
Signed-off-by: bwplotka <bwplotka@gmail.com>
2026-02-18 10:15:14 +01: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
Martin Valiente Ainz
78020ad60e
promtool: fix --enable-feature flags ignored in check config and test rules (#18097)
Both are regressions from the parser refactoring in #17977.

- Fixes #18092
- Fixes #18093

Signed-off-by: Martin Valiente Ainz <64830185+tinitiuset@users.noreply.github.com>
2026-02-16 15:38:26 +01: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
539936c861
Replace per-component parser options with default instance
Signed-off-by: Martin Valiente Ainz <64830185+tinitiuset@users.noreply.github.com>
2026-02-11 11:16:04 +01:00
Martin Valiente Ainz
199d85d5e4
Add parser options parameter to remaining parse functions
Signed-off-by: Martin Valiente Ainz <64830185+tinitiuset@users.noreply.github.com>
2026-02-11 11:16:04 +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
Ian Kerins
4383499997
promtool: support missing promql syntax features (#17926)
Namely promql-duration-expr and promql-extended-range-selectors. This
allows promtool to e.g. check rules files using syntax gated by these
features.

Signed-off-by: Ian Kerins <git@isk.haus>
2026-02-09 07:26:37 +00:00
Matt
cf9d093f8f
prw2: Move Remote Write 2.0 CT to be per Sample; Rename to ST (start timestamp) (#17411) (#17600)
Relates to
https://github.com/prometheus/prometheus/issues/16944#issuecomment-3164760343

Signed-off-by: bwplotka <bwplotka@gmail.com>
Signed-off-by: matt-gp <small_minority@hotmail.com>
Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
2026-02-05 10:40:45 +01:00
Bryan Boreham
e75c893305
Merge pull request #17986 from mdxabu/improve-test-error-handling
tests: improve error handling and helper attribution in main_test.go
2026-02-03 11:15:04 +00:00
Bartlomiej Plotka
7429a75932
scrape: switch scrape manager to AppenderV2 (#17978)
Signed-off-by: bwplotka <bwplotka@gmail.com>
2026-02-02 12:12:06 +00:00
Abu
0495130e06 tests: improve error handling in main_test.go
- Add t.Helper() to getCurrentGaugeValuesFor helper function for better
  error attribution in test failures
- Add require.NoError checks for os.WriteFile calls in TestRuntimeGOGCConfig
  and TestHeadCompactionWhileScraping to catch file write failures
- Strengthen error handling in TestDocumentation to assert command success
  rather than silently continuing on failure
- Improve log message clarity in TestAgentSuccessfulStartup to accurately
  describe early exit scenario

These changes improve test reliability and follow Go testing best practices.

Signed-off-by: Abu <abdullahfakrudeen2020@gmail.com>
2026-02-02 14:40:03 +05:30
Julien Pivotto
3bc688e5cb Features API: Add OpenAPI 3.1 and 3.2
Now that #17825 is merged.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-01-29 14:29:22 +01:00
Bartlomiej Plotka
2597a12080
st: Add a hidden 'st-storage' feature flag for PROM-60 (#17907)
Signed-off-by: bwplotka <bwplotka@gmail.com>
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
2026-01-28 09:05:54 +00:00
Arve Knudsen
a5f86c3fb6
cmd/prometheus: fix flaky TestQueryLog race condition (#17933)
Add waitForQueryLog helper that polls for query log entries to appear
before asserting, rather than reading the file immediately after making
a query. This fixes a race condition where the query log wasn't flushed
to disk before the test read the file.

The helper uses a 5 second timeout with 100ms polling intervals, which
is generous enough to handle slow CI environments while keeping the test
responsive.

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2026-01-27 09:02:16 +00:00
Ganesh Vernekar
3e4a094dbb Add stale_series_compaction_threshold config file option
Signed-off-by: Ganesh Vernekar <ganesh.vernekar@reddit.com>
2026-01-23 18:12:34 -08:00
Bartlomiej Plotka
bec70227f1
feat(scrape)[PART5b]: Add AppenderV2 support to scrape.NewManager constructor (#17872)
* feat(scrape)[PART5b]: Add AppenderV2 support to scrape.NewManager optionally to V1

Signed-off-by: bwplotka <bwplotka@gmail.com>

* Update scrape/manager.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>

* fixes after rebase

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: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2026-01-23 09:04:05 +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
Linas Medziunas
25bd93f9ef Address PR comments
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
2026-01-22 15:41:02 +02:00
wangyazhou
629bd3c5d5
Fix logger syntax for timingsLogger (#17870)
Fix logger syntax for timingsLogger

Signed-off-by: wangyazhou <564631192@qq.com>
2026-01-20 12:15:42 +01: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
Julius Volz
d3b6e61487 Put binop fill modifiers behind a feature flag
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2026-01-15 11:18:48 +01:00
Julius Volz
d6aa6a3fc7 Add new fill modifiers to features test data
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2026-01-15 07:56:23 +01:00
bwplotka
49c3aea56d feat(storage)[PART4b]: add AppenderV2 to the rest of storage.Storage impl
Signed-off-by: bwplotka <bwplotka@gmail.com>
2026-01-14 13:54:27 +00:00
Ben Kochie
d9ed026658
Refractor promtool errors (#17842)
Replace use of `tsdb/errors` with standard library `errors`.

Signed-off-by: SuperQ <superq@gmail.com>
2026-01-13 06:35:11 +00:00
Arthur Silva Sens
1e317d0098
Add configuration option to control extra-scrape-metrics (#17606) 2026-01-06 09:00:49 -03: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
Aditya Tiwari
146080186d
promtool: Add --lint flag to check metrics command to allow disabling linting (#17669)
* promtool: allow cardinality with metrics linting and add --lint to check metrics

Signed-off-by: ADITYA TIWARI <adityatiwari342005@gmail.com>

* fix/ci: Simplify test case variable declaration

Remove unnecessary variable declaration in test cases.

Signed-off-by: ADITYA TIWARI <142050150+ADITYATIWARI342005@users.noreply.github.com>

* promtool: avoid Tee for --lint=none

Signed-off-by: ADITYA TIWARI <adityatiwari342005@gmail.com>

* promtool: validate at least one feature enabled in check metrics
addresses feedback to ensure the command does something useful
now fails with clear error when both --lint=none and no --extended flag.

Signed-off-by: ADITYA TIWARI <adityatiwari342005@gmail.com>

---------

Signed-off-by: ADITYA TIWARI <adityatiwari342005@gmail.com>
Signed-off-by: ADITYA TIWARI <142050150+ADITYATIWARI342005@users.noreply.github.com>
2025-12-18 10:19:06 +00:00
Bartlomiej Plotka
1c0537dc02
Merge pull request #17677 from prometheus/bwplotka/a2-agent
refactor(tsdb/agent)[PART3]: add AppenderV2 support to agent
2025-12-17 14:27:51 +00:00
Bryan Boreham
6f18cc3074
Merge pull request #13409 from smallfish/feature/promtool-dump-series
promtool: add dump-series
2025-12-16 11:51:06 +00:00
NamanParlecha
c94101d023
TSDB: Option to configure TSDB Block Reload Interval (#16728)
Add --storage.tsdb.block-reload-interval flag to configure TSDB block reload interval.

---------

Signed-off-by: Naman-B-Parlecha <namanparlecha@gmail.com>
Signed-off-by: NamanParlecha <namanparlecha@gmail.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2025-12-15 09:31:17 +01:00
bwplotka
ad367b504b refactor(tsdb/agent)[PART3]: add AppenderV2 support to agent
Signed-off-by: bwplotka <bwplotka@gmail.com>
2025-12-13 05:17:39 +00:00
Julien
f73aba34cd
Merge pull request #17427 from roidelapluie/roidelapluie/ffapi
API: Add a /api/v1/features endpoint
2025-12-10 10:14:03 +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
dongjiang
3239723098
Update golangci-lint and add modernize check (#17640)
* add modernize check

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>

* fix golangci lint

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>

---------

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
2025-12-05 09:29:10 +01:00
Julien
0279e14d4a
Merge pull request #17636 from roidelapluie/roidelapluie/starttime
Add start_timestamp field for unit tests
2025-12-04 10:47:24 +01:00
Julien Pivotto
4620c8ac71 Simplify StartTime assignment in unit test setup.
Remove redundant IsZero check since promqltest.LazyLoader already
handles zero StartTime by defaulting to Unix epoch.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2025-12-04 10:14:09 +01:00