16929 Commits

Author SHA1 Message Date
bwplotka
765e7386c8 fix
Signed-off-by: bwplotka <bwplotka@gmail.com>
2026-03-12 17:03:01 +00:00
bwplotka
ede7de014e exp2
Signed-off-by: bwplotka <bwplotka@gmail.com>
2026-03-12 16:21:53 +00:00
bwplotka
1f3e25df09 tmp
Signed-off-by: bwplotka <bwplotka@gmail.com>
2026-03-12 14:25:29 +00:00
avilevy
ce22adc8b6
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>
2026-03-10 17:45:13 +00:00
avilevy
6828a6bdda
Clarify use cases in InitialScrapeOffset comment
Signed-off-by: avilevy <avilevy@google.com>
2026-03-07 02:29:23 +00:00
avilevy
0e478d1f3f
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>
2026-03-07 01:54:04 +00:00
avilevy
df7bd65f58
renamed calculateScrapeOffset to getScrapeOffset
Signed-off-by: avilevy <avilevy@google.com>
2026-02-18 21:30:47 +00:00
avilevy
a134497161
scrape: replace skipOffsetting to make the test offset deterministic instead of skipping it entirely
Signed-off-by: avilevy <avilevy@google.com>
2026-02-18 21:25:10 +00:00
avilevy
8f35d4e343
Adding scape on shutdown
Signed-off-by: avilevy <avilevy@google.com>
2026-02-11 21:23:36 +00:00
Julien
19fd0b0b1d
Merge pull request #18063 from roidelapluie/roidelapluie/actuallyold
chore: Check that previous go version check actually uses previous go version
2026-02-11 16:32:43 +01:00
Julien Pivotto
3f25a53e20 chore: Check that previous go version check actually uses previous go version
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-02-11 16:05:50 +01:00
Julien
a78d7c35f5
Merge pull request #18061 from prometheus/superq/enforce_go_mod_version
Add CI check for Go version support
2026-02-11 15:55:11 +01:00
SuperQ
d8e9ed3246
Add CI check for Go version support
Fail Go mod check if the `go` directive in `go.mod` is newer than
the currently supported Go versions.

Signed-off-by: SuperQ <superq@gmail.com>
2026-02-11 13:36:27 +01:00
Björn Rabenstein
b84d7dcc56
Merge pull request #18058 from zenador/fix-avg-over-time-nh
promql: fix avg_over_time for single native histogram
2026-02-11 12:42:27 +01:00
Julien
7d40cd47e2
Merge pull request #17977 from tinitiuset/tinitiuset/parser-configuration
PromQL: Refactor parser to use instance configuration instead of global flags
2026-02-11 11:48:46 +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
renovate[bot]
edb6731d92
chore(deps): update actions/setup-go action to v6.2.0 (#18055)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-11 09:13:35 +01:00
renovate[bot]
60d365f4c9
chore(deps): update actions/cache action to v5.0.3 (#18053)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-11 09:13:27 +01:00
renovate[bot]
7c39446837
chore(deps): update actions/checkout action to v4.3.1 (#18054)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-11 09:13:16 +01:00
Joe Adams
68df59ba0c
Merge pull request #18029 from matt-gp/ecs-sd-bug-17920
AWS SD: ECS Discover Standalone Tasks
2026-02-10 22:03:28 -05:00
Ganesh Vernekar
873fdf2f0c
Merge pull request #18024 from prometheus/codesome/3-10-go-deps
Update Go dependencies for v3.10 release
2026-02-10 14:30:02 -08:00
Jeanette Tan
d2bb5605dc promql: Fix avg_over_time for single histogram
avg_over_time would produce +Inf count/sum and NaN zero bucket when
averaging a single histogram, because the count variable was initialized
to 0 instead of 1. This caused a division by zero at the end of the
function.

The float version of avg_over_time already correctly initializes count
to 1, this change makes the histogram version consistent with that.

Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2026-02-11 05:06:53 +08:00
Jeanette Tan
9fddb70b8c promql: Add test case for avg_over_time single histogram fix
Add regression test for the bug where avg_over_time with a single
histogram sample would produce +Inf count/sum and NaN zero bucket
due to division by zero. The test verifies that both regular
exponential histograms and native histograms with custom buckets
(NHCB) correctly return the histogram unchanged when averaging
a single sample.

Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2026-02-11 05:06:53 +08:00
Ganesh Vernekar
0ede19e2ee Replace deprecated google.CredentialsFromJSON with option.WithAuthCredentialsFile
Signed-off-by: Ganesh Vernekar <ganesh.vernekar@reddit.com>
2026-02-10 13:03:14 -08:00
Ganesh Vernekar
847e474bf4 Kubernetes SD: Disable WatchListClient in tests
Signed-off-by: Ganesh Vernekar <ganesh.vernekar@reddit.com>
2026-02-10 12:39:34 -08:00
Ganesh Vernekar
1698aada1e Update Go dependencies for v3.10 release
Signed-off-by: Ganesh Vernekar <ganesh.vernekar@reddit.com>
2026-02-10 12:39:33 -08:00
Ganesh Vernekar
43eaaf55a4
Merge pull request #18025 from prometheus/codesome/3-10-npm-deps
Update npm dependencies for v3.10
2026-02-10 12:31:39 -08:00
Bryan Boreham
c096bb0ff0
Merge pull request #18057 from pr00se/symbol-table-too-large-errors
tsdb/index: export sentinel error for symbol table size exceeded
2026-02-10 18:58:34 +00:00
Patryk Prus
d8c24c6bde
tsdb/index: export sentinel error for symbol table size exceeded
Signed-off-by: Patryk Prus <p@trykpr.us>
2026-02-10 12:44:32 -05:00
George Krajcsovits
6fec996722
docs(api): clarify metadata vs remote protocols (#17481)
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2026-02-10 17:33:06 +01:00
Ben Kochie
7b02d25f6c
Increase Renovate speed (#18052)
* Allow Renovate to run all day on the monthly day.
* Increase the max PRs from 10 to 20.
* Incresae the PR open rate from 2 to 5.

Signed-off-by: SuperQ <superq@gmail.com>
2026-02-10 17:27:02 +01:00
ffgan
90166d3ddb
Build riscv64 docker image by default (#17508)
* Allow building riscv64 docker  image

Co-authored by: nijincheng@iscas.ac.cn;

Signed-off-by: ffgan <sudoemt@gmail.com>

* Update Makefile

Co-authored-by: Ben Kochie <superq@gmail.com>
Signed-off-by: ffgan <sudoemt@gmail.com>

---------

Signed-off-by: ffgan <sudoemt@gmail.com>
Co-authored-by: Ben Kochie <superq@gmail.com>
2026-02-10 12:41:44 +01:00
Bryan Boreham
7803b9f9d7
Merge pull request #17531 from bboreham/remove-relabel-process
[REFACTOR] Relabel: Remove unnecessary Process() function
2026-02-10 11:31:04 +00:00
George Krajcsovits
69f1bc9dad
Merge pull request #18040 from mohammadv184/patch-1
docs: fix typo in prometheus_agent.md doc
2026-02-10 12:17:48 +01:00
George Krajcsovits
246341b169
Merge pull request #18041 from matt-gp/aws-sd-msk-optimisations
AWS SD: Optimise MSK Role
2026-02-10 12:17:09 +01:00
Matt
e27bcdf03f
AWS SD: Load Region Fallback (#18019)
* AWS SD: Load Region Fallback

---------

Signed-off-by: matt-gp <small_minority@hotmail.com>
2026-02-10 12:02:24 +01:00
Julien
2f1a797d1a
Merge pull request #18047 from prometheus/superq/tag_push
Also run CI on release tags
2026-02-10 11:27:23 +01:00
dependabot[bot]
effa3c5c25
chore(deps): bump github.com/hashicorp/consul/api from 1.32.0 to 1.33.2 (#17449)
Bumps [github.com/hashicorp/consul/api](https://github.com/hashicorp/consul) from 1.32.0 to 1.33.2.
- [Release notes](https://github.com/hashicorp/consul/releases)
- [Changelog](https://github.com/hashicorp/consul/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hashicorp/consul/compare/api/v1.32.0...api/v1.33.2)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/consul/api
  dependency-version: 1.33.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2026-02-10 08:24:26 +00:00
SuperQ
ac521337ba
Also run CI on release tags
Make sure we also run the main CI workflow `v*` release tags
so `publish_release` job is run.

Signed-off-by: SuperQ <superq@gmail.com>
2026-02-09 15:29:48 +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-gp
96a87a06ea
AWS SD: Optmise MSK Role
Signed-off-by: matt-gp <small_minority@hotmail.com>
2026-02-08 19:42:12 +00:00
matt-gp
5329355ffb
AWS SD: ECS Standalone Tasks
The current ECS role in AWS SD assumes that a task is part of a service.
This means that tasks that are started as part of AWS Batch will get
missed and not be discovered. This changed fixes this so that standalone
tasks can be discovered as well.

Signed-off-by: matt-gp <small_minority@hotmail.com>
2026-02-08 16:04:17 +00:00
Mohammad Abbasi
a19a5314a3
fix(docs): typo in prometheus_agent.md doc
Signed-off-by: Mohammad Abbasi <mohammad.v184@gmail.com>
2026-02-08 19:02:56 +03:30
Sasha
1dcdb07d30
promql: use Kahan summation for Native Histograms (#15687)
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
Bryan Boreham
258fcbda6b [REFACTOR] Relabel: Remove unnecessary Process() function
All uses can be replaced by ProcessBuilder, which is more efficient.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2026-02-06 10:50:16 +00:00
Bartlomiej Plotka
3155c95c1f
feat: add fgprof debug pprof (wall-time profiling capability) (#18027)
Signed-off-by: bwplotka <bwplotka@gmail.com>
2026-02-06 10:23:54 +00:00
Bartlomiej Plotka
5e46e77754
refactor: use Appender mock for otlptranslator tests (#17999)
Signed-off-by: bwplotka <bwplotka@gmail.com>
2026-02-06 09:51:40 +00:00