16097 Commits

Author SHA1 Message Date
bwplotka
f418ea651c Merge branch 'release-2.53' into merge-rel-2.53
Lot's of conflicts so I only ported CHANGELOG.md
2025-06-30 12:12:57 +01:00
Bartlomiej Plotka
d344ea7bf4
Merge pull request #16790 from prometheus/v2.53.4-deps
[RELASE 2.53] Prepare 2.53.5 + Bump deps
v2.53.5
2025-06-30 10:38:19 +01:00
Björn Rabenstein
c3276ea40c
Merge pull request #16789 from gopherorg/main
chore: fix some function names in comment
2025-06-27 23:17:45 +02:00
bwplotka
488a420b6e Upgrade golangci-lint due to timeouts for v1 version.
Signed-off-by: bwplotka <bwplotka@gmail.com>
2025-06-27 16:28:17 +01:00
bwplotka
ddb9f4c70a Update npm packages.
Signed-off-by: bwplotka <bwplotka@gmail.com>
2025-06-27 16:28:17 +01:00
bwplotka
fd4a786443 Prepare 2.53.5 release.
Signed-off-by: bwplotka <bwplotka@gmail.com>
2025-06-27 16:28:13 +01:00
Björn Rabenstein
9e73fb43b3
Merge pull request #16773 from prometheus/beorn7/promql
promql: Re-introduce direct mean calculation
2025-06-27 14:57:12 +02:00
beorn7
ce809e625f promql: Re-introduce direct mean calculation for better accuracy
This commit brings back direct mean calculation (for `avg` and
`avg_over_time`) but isn't an outright revert of #16569. It keeps the
improved incremental mean calculation and features generally a bit
cleaner code than before.

Also, this commit...

- ...updates the lengthy comment explaining the whole situation and
  trade-offs.

- ...divides the running sum and the Kahan compensation term
  separately (in direct mean calculation) to avoid the (unlikely)
  possibility that sum and Kahan compensation together ovorflow
  float64.

- ...uncomments the tests that should now work again on darwin/arm64.

- ...uncomments the test that should now reliably yield the
  (inaccurate) value 0 on all hardware platforms. Also, the test
  description has been updated accordingly.

- ...adds avg_over_time tests for zero and one sample in the range.

Signed-off-by: beorn7 <beorn@grafana.com>
2025-06-27 14:34:46 +02:00
beorn7
f71daa7977 promql: Remove falsified comment from test
The test in question actually worked fine even before #16569. The
finding reported in the comment has turned out to be caused by
something else.

Signed-off-by: beorn7 <beorn@grafana.com>
2025-06-27 14:34:46 +02:00
beorn7
2b3fc1f115 promql: Add test cases for direct mean calculation
These demonstrate that direct mean calculation has some merits after
all.

Signed-off-by: beorn7 <beorn@grafana.com>
2025-06-27 14:34:46 +02:00
Łukasz Mierzwa
748fe6d825
Limit concurrency of scrape pool reloads (#16783)
To avoid possible overload.

As per https://github.com/prometheus/prometheus/pull/16595#issuecomment-3005027067 this changes scrape pool manager to limit the number of scrape pools that can reload at the same time.

Signed-off-by: Lukasz Mierzwa <l.mierzwa@gmail.com>
2025-06-27 12:34:07 +01:00
bwplotka
e6e2f90402 [RELASE 2.53] Bump Go deps in prep for 2.53.4
Also updated Go version to 1.23 as some deps require it.

Signed-off-by: bwplotka <bwplotka@gmail.com>
2025-06-27 09:49:55 +01:00
gopherorg
b86d4ba312 chore: fix some function names in comment
Signed-off-by: gopherorg <gopherworld@icloud.com>
2025-06-27 15:34:53 +08:00
Jan-Otto Kröpke
df4f1df43f
Merge pull request #16787 from jkroepke/release-3.4-main 2025-06-27 05:28:42 +02:00
Jan-Otto Kröpke
5a1deb84cc
Merge branch 'release-3.4' into release-3.4-main
# Conflicts:
#	CHANGELOG.md
2025-06-26 22:54:24 +02:00
Jan-Otto Kröpke
b392caf256
Prepare release 3.4.2
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
v0.304.2 v3.4.2
2025-06-26 22:48:39 +02:00
Arve Knudsen
9c791faade
OTLP receiver: Don't append _total suffix to non-monotonic OTel sums (#16776)
* OTLP receiver: Don't append _total suffix to non-monotonic OTel sums

Fix the OTLP receiver so the suffix _total isn't appended to metrics
converted from non-monotonic OTel sum metrics, if otlp.translation_strategy is
UnderscoreEscapingWithSuffixes or NoUTF8EscapingWithSuffixes.

Also add translation tests.

---------

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2025-06-25 18:18:45 +02:00
Owen Williams
aa1d46a9da
scrape: set validation and escaping defaults in default config vars (#16751)
Fixes https://github.com/prometheus/prometheus/issues/16750

Signed-off-by: Owen Williams <owen.williams@grafana.com>
2025-06-25 11:14:13 -04:00
George Krajcsovits
5b7ff92d95
fix(promql): histogram_quantile and histogram_fraction NaN observed in native histogram (#16724)
* fix(promql): histogram_quantile NaN observed in native histogram

Fixes: #16578

See the issue for detailed explanation.
When a histogram had only NaN observations and no normal observations,
we returned 0 from the quantile, which is completely wrong. If there were
normal observations but we went over them, we returned the upper bound of
the existing buckets, however that contradicts expectations on
histogram_fraction. Now we return NaN if the quantile is calculated to be
over all normal observations, falling into NaNs (in a virtual +Inf bucket).

We also return info level annotations if we see any NaN observations.
The annotation calls out if we returned NaN or even if we took the
virtual +Inf bucket into account.

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

* fix(promql): histogram_fraction NaN observed in native histogram

Fixes: #16580

According to the specification we should not take NaN observations
into account when calculating the fraction. This commit fixes that
and adds an info level annotation to let the user know about this.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2025-06-25 13:37:43 +02:00
Bartlomiej Plotka
eb44f9232d
Backward compatibility with upcoming index v3 (#16762)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
Co-authored-by: Ganesh Vernekar <ganeshvern@gmail.com>
2025-06-25 09:11:26 +01:00
Rishi Jat
31e158b749
Add documentation for custom_values usage in NHCB (#16757)
Signed-off-by: rishi-jat <rishijat098@gmail.com>
Signed-off-by: Rishi Jat <rishijat098@gmail.com>
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
2025-06-24 21:52:55 +02:00
Bryan Boreham
a8e32147b3
[BUGFIX] Top-level: Update GOGC before loading TSDB (#16521)
We should use the configured value, or Prometheus' default of 75%, while
initializing and loading the WAL.

Since the Go default is 100%, most Prometheus users would experience
higher memory usage before the value is configured.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2025-06-24 15:02:17 +01:00
Bryan Boreham
bdada2330c
Merge pull request #16765 from bboreham/update-go-deps
Release 3.5 preparation: Update go dependencies
2025-06-24 12:20:06 +01:00
Carrie Edwards
7289d41940
Add tests for relabeling of type and unit labels (#16743)
Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>
2025-06-23 16:42:38 +01:00
Bryan Boreham
d6f9ba6310 [BUILD] Docker SD: Fix up deprecated types
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2025-06-23 16:15:58 +01:00
Bryan Boreham
95d47c0512 [TESTS] Rules: remove brittle TestNewGroup
It broke on different implementation of 'NewNopLogger'.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2025-06-23 15:34:03 +01:00
Bryan Boreham
b2e0d3f16c [BUILD] Wind back dependencies which require Go 1.24
We need Prometheus to build with the last 2 versions of Go.

Remove Go toolchain line - it is redundant with the `go`` line above,
and could mislead readers.

Also don't update `fsnotify` which is pinned to an older version.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2025-06-23 15:33:12 +01:00
Bryan Boreham
3253ba6310 [BUILD] Wind back otlptranslator update which has breaking change
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2025-06-23 14:27:37 +01:00
Bryan Boreham
b0b3676f35 [BUILD] Ran make update-go-deps
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2025-06-23 14:19:40 +01:00
Bryan Boreham
2a1093e9be [BUILD] Don't specify -d for go get
It is deprecated; see https://golang.org/doc/go1.18#go-get

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2025-06-23 14:15:33 +01:00
Björn Rabenstein
8ed37d3c09
Merge pull request #16744 from harry671003/fix_last_over_time
PromQL: Fix native histogram last_over_time
2025-06-23 00:56:08 +02:00
Kapil Lamba
030835560b promqltest: add/remove explicit annotation expectations to relevant tests
Signed-off-by: Kapil Lamba <kapillamba4@gmail.com>
2025-06-21 18:46:50 +05:30
Kapil Lamba
658e9c5155 promqltest: migrate test files to new syntax using basic mode
Signed-off-by: Kapil Lamba <kapillamba4@gmail.com>
2025-06-21 18:46:33 +05:30
Julius Volz
d668382608
Merge pull request #16759 from roidelapluie/add-info-warning-graph
mantine-ui: add query info warnings display to graph view
2025-06-21 09:49:07 +02:00
Julien Pivotto
c07950e5e9 docs: remote read: Mention buf.build
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2025-06-20 16:25:55 +02:00
Arve Knudsen
c701636034
OTLP receiver: Rename otlp.convert_scope_metadata to otlp.promote_scope_metadata (#16760)
* Rename otlp.convert_scope_metadata to otlp.promote_scope_metadata

---------

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Julius Hinze <juliusmh@proton.me>
2025-06-20 13:09:02 +00:00
Julien
8f75da3fd6
Merge pull request #16754 from simonpasquier/fix-promql-panic
fix: prevent invalid array access in aggregate expression
2025-06-20 13:53:59 +02:00
Julien Pivotto
7f2946ccdd mantine-ui: add query info warnings display to graph view
Followup of https://github.com/prometheus/prometheus/pull/16753

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2025-06-20 13:47:15 +02:00
Simon Pasquier
71217a6e43
fix: prevent invalid array access in aggregate expression
This commit fixes the evaluation of invalid expressions like
`sum(rate(`. Before that, it would trigger a panic in the PromQL engine
because it tried to access an index which is out of range.

The bug was probably introduced by 06d0b063ea.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2025-06-19 15:11:38 +02:00
Julien
76a97ca273
Merge pull request #16753 from roidelapluie/add-warning-graph
mantine-ui: add query warnings display to graph view
2025-06-19 14:05:35 +02:00
Julien Pivotto
8dcb0ba24a mantine-ui: add query warnings display to graph view
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2025-06-19 12:17:25 +02:00
Kapil Lamba
69906bb4f5
Add script for converting PromQL tests to new syntax format (#16562)
Signed-off-by: Kapil Lamba <kapillamba4@gmail.com>
Co-authored-by: Neeraj Gartia <80708727+NeerajGartia21@users.noreply.github.com>
2025-06-18 23:57:39 +02:00
Charles Korn
8d9dfa075d
promql: reuse histogramStatsIterator where possible, and expose it for other implementations to use (#16686)
* Expose type
* Add `Reset` method

---------

Signed-off-by: Charles Korn <charles.korn@grafana.com>
2025-06-18 23:53:46 +02:00
Björn Rabenstein
32b471ed47
Merge pull request #16417 from amanycodes/histogram-helper-test
ui-tests: Add Unit tests to Native histogram and its helpers.
2025-06-18 20:11:23 +02:00
Björn Rabenstein
f69c83f5f1
Merge pull request #16702 from bboreham/simpler-detect
[Refactor] PromQL: Simplify detectHistogramStatsDecoding
2025-06-18 13:02:55 +02:00
Arve Knudsen
964bd7d1a9
OTLP: Support including scope metadata as metric labels (#16730)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2025-06-18 09:13:51 +02:00
🌲 Harry 🌊 John 🏔
59bf3d442b PromQL: Fix native histogram last_over_time with offset
Signed-off-by: 🌲 Harry 🌊 John 🏔 <johrry@amazon.com>
2025-06-17 10:49:06 -07:00
Matthias Loibl
cfa922e677
Merge pull request #16739 from datamuc/patch-1
prometheus-mixin: Fix unit for Scrape failures
2025-06-17 16:38:33 +02:00
datamuc
9b894ee4f6
Fix unit for Scrape failures
Signed-off-by: datamuc <m@rbfh.de>
2025-06-17 16:21:20 +02:00
Jan-Otto Kröpke
ceaa3bd6f9
discovery: add STACKIT SD (#16401) 2025-06-17 15:41:14 +02:00