17230 Commits

Author SHA1 Message Date
Bartlomiej Plotka
788d122903
Merge pull request #18247 from prometheus/krajo/replace-encoding
feat(chunkenc): replace xoroptst chunk encoding with xor2
2026-03-11 17:15:38 +01:00
Bartlomiej Plotka
a73202012b
tsdb/wlog[PERF]: optimize WAL watcher reads (up to 540x less B/op; 13000x less allocs/op) (#18250)
See the detailed analysis https://docs.google.com/document/d/1efVAMcEw7-R_KatHHcobcFBlNsre-DoThVHI8AO2SDQ/edit?tab=t.0

I ran extensive benchmarks using synthetic data as well as real WAL segments pulled from the prombench runs.

All benchmarks are here https://github.com/prometheus/prometheus/compare/bwplotka/wal-reuse?expand=1

* optimization(tsdb/wlog): reuse Ref* buffers across WAL watchers' reads

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

* optimization(tsdb/wlog): avoid expensive error wraps

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

* optimization(tsdb/wlog): reuse array for filtering

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

* fmt

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

* lint fix

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

* tsdb/record: add test for clear() on histograms

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

* updated WriteTo with what's currently expected

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

---------

Signed-off-by: bwplotka <bwplotka@gmail.com>
2026-03-11 09:17:13 +00:00
Munem Hashmi
89b3ad45a8
discovery/file: restore atomic file writes in tests (#18259)
PR #17269 replaced atomic os.Rename-based file writes with
os.WriteFile to fix a Windows flake. However, os.WriteFile is not
atomic (it truncates then writes), and fsnotify can fire between
the truncate and write, causing the watcher to read an empty file
and replace valid targets with empty ones.

Restore atomicity by writing to a temporary file and renaming.
On Windows, retry the rename with a short backoff to handle
transient "Access is denied" errors when the file watcher or
readFile holds an open handle to the destination.

Fixes #18237

Signed-off-by: Munem Hashmi <munem.hashmi@gmail.com>
2026-03-11 08:12:56 +01:00
Bartlomiej Plotka
f7c60bf97e
Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
2026-03-10 15:55:40 +00:00
György Krajcsovits
a773d3daad
replace stray xoroptst words
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2026-03-10 16:23:08 +01:00
George Krajcsovits
1906c9877f
Add remyleone as Scaleway maintainer (#18268)
* Add remyleone as Scaleway maintainer


Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>

* Add name and email

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>

---------

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: George Krajcsovits <krajorama@users.noreply.github.com>
2026-03-10 14:02:03 +00:00
George Krajcsovits
7cbe0e3a5c
tsdb/agent: Prevent duplicate SeriesRefs from being lost in stripeSeries (#17538)
* Show the agent db can hold duplicate series by hash

Signed-off-by: Kyle Eckhart <kgeckhart@users.noreply.github.com>

* Prevent duplicate SeriesRefs from being lost in db stripeSeries

Signed-off-by: Kyle Eckhart <kgeckhart@users.noreply.github.com>

* Drop default initialized value

Signed-off-by: Kyle Eckhart <kgeckhart@users.noreply.github.com>

* More comments and only reset deleted if the new segment is larger

Signed-off-by: Kyle Eckhart <kgeckhart@users.noreply.github.com>

* Manually manage db/rw to prevent windows test error

Signed-off-by: Kyle Eckhart <kgeckhart@users.noreply.github.com>

* Fix incorrect type from rebase

Signed-off-by: Kyle Eckhart <kgeckhart@users.noreply.github.com>

* Use Set in GetOrSet to enforce proper lock ordering

Signed-off-by: Kyle Eckhart <kgeckhart@users.noreply.github.com>

* Missing period and left over refactor

Signed-off-by: Kyle Eckhart <kgeckhart@users.noreply.github.com>

---------

Signed-off-by: Kyle Eckhart <kgeckhart@users.noreply.github.com>
2026-03-10 14:31:48 +01:00
bwplotka
6ab5d8f9be feat(agent): add support for appending ST
Signed-off-by: bwplotka <bwplotka@gmail.com>
2026-03-10 12:27:48 +00:00
Bartlomiej Plotka
de56b4c528
Merge pull request #18263 from linasm/do-not-skip-buckets-if-trimming
fix(PromQL): do not skip histogram buckets when trimming
2026-03-10 12:37:57 +01:00
bwplotka
53e7b61692 feat: add compliance RW sender test for agent
Signed-off-by: bwplotka <bwplotka@gmail.com>
2026-03-10 11:33:15 +00:00
Bryan Boreham
d5b46b84cd
Merge pull request #18211 from aknuds1/arve/general-maintainer
Move aknuds1 to general maintainer
2026-03-10 11:24:00 +00:00
Bryan Boreham
82f7338842
Merge pull request #17839 from roidelapluie/roidelapluie/remove-old-fuzz
Fuzzing: Remove old go-fuzz infrastructure
2026-03-10 10:22:28 +00:00
George Krajcsovits
fc293b59a6
Add rexagod as K8S maintainer (#18267)
* Add rexagod as K8S maintainer

with approval rights.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>

* Update MAINTAINERS.md

Co-authored-by: Pranshu Srivastava <rexagod@gmail.com>
Signed-off-by: George Krajcsovits <krajorama@users.noreply.github.com>

---------

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: George Krajcsovits <krajorama@users.noreply.github.com>
Co-authored-by: Pranshu Srivastava <rexagod@gmail.com>
2026-03-10 09:42:44 +00:00
George Krajcsovits
e149a6e383
Merge pull request #18198 from prometheus/krajo/hetzner-sd
Add Hetzner maintainers
2026-03-10 09:46:19 +01:00
Linas Medziunas
5ba581748c fix(PromQL): do not skip histogram buckets when trimming
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
2026-03-09 15:25:24 +02:00
Julius Volz
efbdc3f886
Merge pull request #18244 from Ketan-Goyal/main
Alerting: Handling the Case of Increased holdDuration in alert rules
2026-03-06 20:08:42 +00:00
George Krajcsovits
f659ca383a
Merge pull request #18252 from linasm/optimize-float-histogram-kahan-add
perf(PromQL): improve performance of FloatHistogram.KahanAdd
2026-03-06 19:06:25 +01:00
Linas Medziunas
d7274562dc perf(PromQL): improve performance of FloatHistogram.KahanAdd
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
2026-03-06 17:50:55 +02:00
Julien
7cb405bad4
Merge pull request #18246 from roidelapluie/roidelapluie/prombench-statuses-permission
ci: add statuses write permission to prombench workflow
2026-03-06 15:15:36 +01:00
György Krajcsovits
5e5b14c04b
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>
2026-03-06 14:35:06 +01:00
Julien Pivotto
f04b52773e ci: add statuses write permission to prombench workflow
The workflow posts commit status updates via the GitHub API, but
the GITHUB_TOKEN only had 'contents: read', causing HTTP 403 on
all statuses API calls.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-03-06 12:55:12 +01:00
Julien
6a9589daf9
Merge pull request #18245 from charleskorn/charleskorn/lookback-delta-docs
docs: clarify that `lookback_delta` query parameter takes either a duration or number of seconds
2026-03-06 11:55:36 +01:00
Julien
3b44b8b463
Merge pull request #18229 from roidelapluie/roidelapluie/ombug
textparse: fix parseLVals to only treat quoted strings as metric names
2026-03-06 10:06:12 +01:00
Charles Korn
24bc6d27ac
docs: clarify that lookback_delta query parameter takes either a duration or number of seconds
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2026-03-06 19:07:33 +11:00
Ketan Goyal
7dea9af493 Alerting: Handling the Case of Increased holdDuration in alert rules
Signed-off-by: Ketan Goyal <ketangoyal125@gmail.com>
2026-03-06 03:23:07 +05:30
Julius Volz
cddac4d3df
Merge pull request #18134 from prometheus/deps-update/mantine-ui
chore(deps): update mantine ui to v8.3.16
2026-03-05 17:46:15 +00:00
renovate[bot]
6b8fc582d1
chore(deps): update mantine ui to v8.3.16 2026-03-05 14:46:53 +00:00
Julien Pivotto
ad2f81ef6d textparse: fix parseLVals to only treat quoted strings as metric names
When a label-name position is followed by comma or brace-close, only
treat it as a metric name shorthand if the token was a double-quoted
string (tQString). Bare identifiers must be followed by an equal sign.

Add tests for bare identifier inputs that previously could panic.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-03-05 15:07:42 +01:00
Bartlomiej Plotka
9dc782bf2c
Merge pull request #18220 from prometheus/extended-test
tests(tsdb/wlog): Tighten watcher tail tests
2026-03-05 11:31:04 +01:00
Bartlomiej Plotka
4e3efec434
Apply suggestions from code review
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
2026-03-05 09:31:31 +00: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
Julius Volz
53f8072553
Merge pull request #18230 from prometheus/fix/uplot-stacked-series-hover-perf
UI: Skip recomputing stacked chart data on hover
2026-03-05 08:38:43 +00:00
Julius Volz
2df86b24ad UI: Skip restacking on hover in stacked series charts
See https://github.com/leeoniya/uPlot/issues/988

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2026-03-04 21:53:11 +01:00
Julius Volz
ac12e30f99
Merge pull request #18227 from prometheus/fix-name-md-formatting
Docs: Fix Markdown formatting for `__name__` label mention
2026-03-04 18:59:16 +00:00
Julius Volz
2aebd269bc UI: Fix tooltip Y-offset drift for multiple graph panels
getBoundingClientRect() was cached in the setSize hook, which only fires
on chart creation/resize. The cached viewport-relative coordinates became
stale after scrolling, causing the tooltip to appear increasingly offset
on charts further down the page.

Fixed by calling getBoundingClientRect() on every setCursor invocation to
always get accurate viewport-relative coordinates.

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2026-03-04 14:52:37 +01:00
Julius Volz
c023dec14b Docs: Fix Markdown formatting for __name__ label mention
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2026-03-04 14:22:14 +01:00
Matt
5a02b92c0e
AWS SD: RDS Role (#18206) 2026-03-04 12:17:38 +01:00
Frederic Branczyk
b9ce7f3be0
Merge pull request #18192 from rexagod/17193
discovery/k8s: Dedup EPS for `*DualStack` policies
2026-03-04 11:46:44 +01:00
Frederic Branczyk
44699107d2
Merge pull request #17774 from rexagod/16747
discovery/kubernetes: Support linked pod controllers
2026-03-04 11:07:14 +01:00
Julius Volz
6a9866e689
Merge pull request #18223 from jan--f/ui-build-switch
build: add option to choose which UI to build
2026-03-04 09:33:58 +00:00
Julien Pivotto
c2fc92e2f3 Fuzzing: Remove old go-fuzz infrastructure
After the migration to native Go fuzzing in PR #17393, this removes
the old dvyukov/go-fuzz based infrastructure. This enables a smooth
transition, because we can merge this pull request when upstream
OSS-Fuzz changes have been done.

This removes:
- promql/fuzz.go and promql/fuzz_test.go (old fuzz functions)
- promql/fuzz-data/ (old corpus files)

The new fuzzing infrastructure is in util/fuzzing/ and is now used
by the CI workflow.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-03-04 09:41:21 +01:00
Jan Fajerski
b7435e675c build: add option to build with only the mantine UI
This adds the `--mantine-ui` switch to `web/ui/build_ui.sh` which
allows to build without the old react UI. If built with only the mantine
ui and started with `--enable-features=old-ui` the user will get a 404
response on th web port.

Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
2026-03-04 08:55:37 +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
Ayoub Mrini
5c1af24733
Merge pull request #17356 from machine424/gg
chore(test): make failures in TestRemoteWrite_PerQueueMetricsAfterRelabeling more explicit/rich to help with debugging the test when it flakes for GOARCH=386
2026-03-03 20:25:13 +01:00
Kyle Eckhart
897ba10d11
remote write: fix sent_batch_duration_seconds measuring before the request is sent (#18214)
* remote write: fix sent_batch_duration_seconds measuring before the request was sent

Signed-off-by: Kyle Eckhart <kgeckhart@users.noreply.github.com>
2026-03-03 10:57:55 -08: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
Pranshu Srivastava
9d2ed113c8
fixup! fixup! fixup! discovery/kubernetes: Support linked pod controllers
Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
2026-03-03 18:34:03 +05:30
Pranshu Srivastava
ebacf4a084
fixup! fixup! discovery/kubernetes: Support linked pod controllers
Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
2026-03-03 18:30:52 +05:30
Pranshu Srivastava
f21785f5a9
fixup! discovery/kubernetes: Support linked pod controllers
Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
2026-03-03 18:30:52 +05:30
Pranshu Srivastava
228b94f6eb
discovery/kubernetes: Support linked pod controllers
Extended Kubernetes SD to support the following pod-based labels:
* `__meta_kubernetes_pod_deployment_name`
* `__meta_kubernetes_pod_cronjob_name`
* `__meta_kubernetes_pod_job_name`

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
2026-03-03 18:30:48 +05:30