16097 Commits

Author SHA1 Message Date
Owen Williams
5a1cce4fbb
config: fix typo in comments (#16734)
Signed-off-by: Owen Williams <owen.williams@grafana.com>
2025-06-17 08:24:30 -04:00
Julien
e81132f162
Merge pull request #16733 from MichaHoffmann/mhoffmann/fix-ts-of-last-over-time-histograms
promql: fix ts_of_last_over_time for histogram vectors
2025-06-17 09:18:31 +02:00
Michael Hoffmann
ec98e7f069 promql: fix ts_of_last_over_time for histogram vectors
This PR fixes a bug in ts_of_last_over_time where the float samples
where used when computing the last timestamp of the histogram samples.

Signed-off-by: Michael Hoffmann <mhoffmann@cloudflare.com>
2025-06-16 13:09:49 +00:00
Julien Pivotto
0fb698675c docs: Direct link to remote read proto to the main branch
Left over of the master->main branch rename.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2025-06-16 11:47:58 +02:00
Julien
998840c496
Merge pull request #16713 from roidelapluie/fix-pow-dur-expr
promql: Fix unary operator precedence in duration expressions
2025-06-16 11:13:34 +02:00
Julien Pivotto
db15681633 Update duration expression docs
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2025-06-16 10:53:36 +02:00
Julien Pivotto
6d56e77e0e promql: Fix unary operator precedence in duration expressions
Split unary operator handling in duration expressions into two specific
cases to fix precedence conflicts:
- Handle unary operators with number literals directly
- Handle unary operators with parenthesized expressions separately

This prevents unary minus from incorrectly binding to subsequent
operators in expressions like `foo offset -1^1`, ensuring it parses
as `(foo offset -1) ^ 1` rather than `foo offset (-1^1)`.

Fixes #16711

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2025-06-13 13:40:50 +02:00
Björn Rabenstein
4aee718013
Merge pull request #16722 from MichaHoffmann/mhoffmann/add-tmin-tmax-tlast-over-time-functions
promql: add ts_of_(min|max|last)_over_time
2025-06-12 19:40:18 +02:00
Michael Hoffmann
a5fa9431d8 promql: add ts_of_(max,min,last)_over_time functions
This commit adds the ts_of_(max,min,last)_over_time functions behind the experimental feature flag.

Signed-off-by: Michael Hoffmann <mhoffmann@cloudflare.com>
2025-06-12 15:03:28 +00:00
Julius Volz
4eeeb6ee88
Fetch and display full query stats in hover tooltip in table query tab (#16723)
Fixes https://github.com/prometheus/prometheus/issues/5857

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2025-06-12 14:16:41 +00:00
George Krajcsovits
c9d638fd8f
Merge pull request #16720 from krajorama/krajo/fix-nhcb-after-exponential
fix(nhcb): not converting to NHCB after exponential native histogram encountered
2025-06-12 15:52:35 +02:00
Aman
f8508ccafa
mantine-ui: fix /alerts accordian theme colors (#16043)
* fix-alerts-accordion-theme

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

* fixes

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

* added changes to /rules page

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

* more fixes

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

---------

Signed-off-by: amanycodes <amanycodes@gmail.com>
Signed-off-by: Aman <95525722+amanycodes@users.noreply.github.com>
2025-06-12 08:23:04 +00:00
AxcelXander
472f0de661
Enhance TestDropOldTimeSeries to test both v1 and v2 protocols (#16709)
- Wrapped existing test logic in a loop to run with both protocol versions
- Ensures consistent behavior across protocol versions for dropping old time series

Signed-off-by: AxcelXander <tyz666@bu.edu>
Co-authored-by: AxcelXander <tyz666@bu.edu>
2025-06-11 13:06:45 -07:00
György Krajcsovits
85d63ba861
refactor(nhcb): get rid of extra lastHistogramExponential state
and make it a regular state of inhibiting NHCB conversion.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2025-06-11 20:06:38 +02:00
György Krajcsovits
3844a21738
fix(nhcb): do not loose NHCB after exponential with different labels
The problem happens when we parse a standalone native histogram, which
sets the p.lastHistogramExponential state flag. We never unset it.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2025-06-11 19:48:56 +02:00
Innokentii Konstantinov
94d5e0f41c
engine: fix PossibleNonCounterInfo annotation for rate and increase. (#16718)
* Comment exposed field

Signed-off-by: Innokentii Konstantinov <innokenty.konstantinov@grafana.com>

* Remove invalid test

Signed-off-by: Innokentii Konstantinov <innokenty.konstantinov@grafana.com>

* Fix PossibleNonCounterInfo annotation.

Signed-off-by: Innokentii Konstantinov <innokenty.konstantinov@grafana.com>

* lint

Signed-off-by: Innokentii Konstantinov <innokenty.konstantinov@grafana.com>

---------

Signed-off-by: Innokentii Konstantinov <innokenty.konstantinov@grafana.com>
2025-06-11 14:09:57 +01:00
Charles Korn
5926159f2a
Clarify expected behaviour of on(__name__)
See https://github.com/prometheus/prometheus/issues/16631

Signed-off-by: Charles Korn <charles.korn@grafana.com>
2025-06-11 13:38:06 +10:00
Charles Korn
0c6ef1b23c
Clarify behaviour of bool modifier
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2025-06-11 13:38:05 +10:00
Charles Korn
40bed6281e
Clarify behaviour of metric names with bool modifier
Based on discussion in https://github.com/prometheus/prometheus/issues/15471

Signed-off-by: Charles Korn <charles.korn@grafana.com>
2025-06-11 13:38:02 +10:00
Charles Korn
1e794f7ef9
Break large paragraphs into smaller pieces
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2025-06-11 13:21:10 +10:00
Björn Rabenstein
19848bb445
Merge pull request #16715 from prometheus/beorn7/promql
promql: Deactivate three failing tests for the time being
2025-06-11 01:03:32 +02:00
beorn7
68b1bcc648 promql: typo fix in comment
Signed-off-by: beorn7 <beorn@grafana.com>
2025-06-10 22:06:04 +02:00
beorn7
c3da460474 promql: Deactivate three failing tests for the time being
These tests fail on darwin/arm64.

One is expected, because the test demonstrates the limits of the
numerical accuracy of our methods, and different inaccurate outcomes
on different hardware are expected.

The other two are mysterious at the moment, see
https://github.com/prometheus/prometheus/issues/16714 for detailed
discussion and debugging.

Signed-off-by: beorn7 <beorn@grafana.com>
2025-06-10 21:48:52 +02:00
Björn Rabenstein
ea75bc18e9
Merge pull request #16697 from Konstantinov-Innokentii/export-query-samples-fields
stats: Export QuerySamples StartTimestamp and Interval fields
2025-06-10 15:05:22 +02:00
Łukasz Mierzwa
c528293376
Enhancement: Reload all scrape pools concurrently (#16595)
* Reload all scrape pools concurrently

At the moment all scrape pools that need to be reloaded are reloaded one by one. While reloads are ongoing mtxScrape is locked.
For each pool that's being reloaded we need to wait until all targets are updated.
This whole process can take a while and the more scrape pools to reload the longer.
At the same time all pools are independent and there's no real reason to do them one-by-one.
Reload each pool in a seperate goroutine so we finish config reload as ASAP as possible and unlock the mtxScrape.

Signed-off-by: Lukasz Mierzwa <l.mierzwa@gmail.com>

* Address PR review feedback

Signed-off-by: Lukasz Mierzwa <l.mierzwa@gmail.com>

---------

Signed-off-by: Lukasz Mierzwa <l.mierzwa@gmail.com>
2025-06-09 16:01:35 +02:00
Björn Rabenstein
8fc1750bcc
Merge pull request #16569 from prometheus/beorn7/promql2
promql: Simplify avg aggregation and avg_over_time
2025-06-07 00:16:20 +02:00
beorn7
64431830b8 Add more avg_over_time test cases with extreme values
These tests were initially created by @crush-on-anechka. I modified
them slightly.

Signed-off-by: beorn7 <beorn@grafana.com>
2025-06-06 23:50:08 +02:00
Jan-Otto Kröpke
6d10fce2b6
Merge pull request #16699 from prometheus/release-3.4 2025-06-06 17:04:53 +02:00
Bryan Boreham
91eab63d38 [Refactor] PromQL: Simplify detectHistogramStatsDecoding
Restarting the depth-first walk on each leg of a binary expression is
convoluted. ISTM the correct logic is to walk the path backwards to the
first relevant function.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2025-06-06 14:52:59 +01:00
Arthur Silva Sens
8d0a747237
PROM-39: Provide PromQL info annotations when rate()/increase() over series without __type__="counter" label (#16632)
* Provide PromQL info annotations when rate()/increase() over series without counter label

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

* Address comments

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

---------

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
2025-06-06 10:01:20 -03:00
Ayoub Mrini
50ba25f273
chore(docs/kubernetes SD): add a note about Endpoints API being deprecated in kubernetes 1.33+ (#16684)
* chore(docs/kubernetes SD): add a note about Endpoints API being deprecated in kubernetes 1.33+

Signed-off-by: machine424 <ayoubmrini424@gmail.com>

* chore(discovery/kubernetes): add Endpoints API deprecation comment

Signed-off-by: machine424 <ayoubmrini424@gmail.com>

---------

Signed-off-by: machine424 <ayoubmrini424@gmail.com>
2025-06-06 11:56:27 +02:00
Innokentii Konstantinov
cd5bd11bd8 Export QuerySamples StartTimestamp and Interval to enable custom statistics implementations to populate these fields as needed.
Signed-off-by: Innokentii Konstantinov <innokenty.konstantinov@grafana.com>
2025-06-06 15:31:37 +08:00
beorn7
ff67596a82 promql: Simplify avg aggregation and avg_over_time
As it turns out, if we combine Kahan summation and incremental mean
calculation properly, it works quite well and we do not need to switch
between simple mean calculation and incremental calculation based on
overflow.

This simplifies the code quite a bit.

Signed-off-by: beorn7 <beorn@grafana.com>
2025-06-05 23:26:56 +02:00
Björn Rabenstein
41594cebb4
Merge pull request #16566 from prometheus/beorn7/promql
promqltest: Adjust more tests to "left-open" ranges
2025-06-05 16:45:38 +02:00
beorn7
a4d57fce74 promqltest: Adjust more tests to "left-open" ranges
This was an oversight because the old tests still happened to pass
with the new behavior, but important test data was excluded at the
left end of the interval, rendering some tests not actually testing
what we want to test.

In the past, we also applied different strategies to adjust the test
(extend the range from 1m to 2m, or set the evaluation timestamp to
45s). This commit unifies things and reduces redundancy.

Signed-off-by: beorn7 <beorn@grafana.com>
2025-06-05 14:06:51 +02:00
Arthur Silva Sens
ed0de41b73
bugfix: Default OTLP config not respected when otlp: block is unset (#16693)
Co-authored-by: Jan-Otto Kröpke <mail@jkroepke.de>
2025-06-04 22:52:39 +02:00
Björn Rabenstein
eb1272eda7
Merge pull request #16653 from jkroepke/release-3.4-main
Merge release-3.4 into main
2025-06-04 18:06:11 +02:00
Björn Rabenstein
5f28c6be62
Merge pull request #16642 from rajagopalanand/restore-for-state-refactor
refactor: Move 'for' state restoration metric to defer block
2025-06-04 18:04:31 +02:00
George Krajcsovits
ecd99bd3bf
Merge pull request #16682 from prometheus/krajo-fix-histogram-count-bug-main
fix(promql): histogram_count and histogram_sum inconsistent
2025-06-04 14:40:26 +02:00
György Krajcsovits
bccb1d6459
fix(promql): do not loose information about buckets when doing the detect
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2025-06-04 10:24:50 +02:00
zenador
40a27ce875
Make translatorMetricFromOtelMetric public (#16683)
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2025-06-03 12:39:21 +02:00
György Krajcsovits
df94ecebab
fix(promql): histogram_count inconsistent
The problem is in the counter reset detection. The code that loads the
samples is matrixIterSlice which uses the typed Buffer iterator, which
will preload the integer histogram samples, however the last sample is
always(!) loaded as a float histogram sample in matrixIterSlice and the
optimized iterator fails to detect counter resets in that case.

Also the iterator does not reset lastH, lastFH properly.

Ref: https://github.com/prometheus/prometheus/issues/16681

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2025-06-03 12:31:27 +02:00
György Krajcsovits
e6b838391a
test(promql): histogram_count inconsistent
Ref: https://github.com/prometheus/prometheus/issues/16681

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2025-06-03 12:11:59 +02:00
Julius Volz
8fd46f74aa
Merge pull request #16643 from prometheus/standardize-docs-page-titles
Standardize doc page title handling
2025-06-02 13:40:03 +02:00
dependabot[bot]
089119a03c
chore(deps): bump actions/setup-go from 5.4.0 to 5.5.0 in /scripts
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5.4.0 to 5.5.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](0aaccfd150...d35c59abb0)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-version: 5.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-02 00:17:37 +00:00
dependabot[bot]
3111370d35
chore(deps): bump dependabot/fetch-metadata from 2.3.0 to 2.4.0
Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 2.3.0 to 2.4.0.
- [Release notes](https://github.com/dependabot/fetch-metadata/releases)
- [Commits](d7267f607e...08eff52bf6)

---
updated-dependencies:
- dependency-name: dependabot/fetch-metadata
  dependency-version: 2.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-02 00:17:27 +00:00
Julius Volz
ef430074f3
Merge pull request #16567 from ryanwuer/optimize-target-pool-search-experience
UI: optimize pool searching in /targets page
2025-05-31 16:53:58 +02:00
Jan-Otto Kröpke
638dc8dbdc
Merge branch 'release-3.4' into release-3.4-main
# Conflicts:
#	.github/workflows/ci.yml
#	CHANGELOG.md
#	RELEASE.md
#	VERSION
#	cmd/prometheus/main_test.go
#	docs/configuration/configuration.md
#	web/ui/mantine-ui/package.json
#	web/ui/module/codemirror-promql/package.json
#	web/ui/module/lezer-promql/package.json
#	web/ui/package-lock.json
#	web/ui/package.json
2025-05-31 12:48:16 +02:00
Jan-Otto Kröpke
aea6503d9b
Release 3.4.1 (#16652) v0.304.1 v3.4.1 2025-05-31 08:41:19 +02:00
Ayoub Mrini
f1db64f4c5
fix(test): fall back to default direct I/O requirements in tests when statx isn't supported by using a higher lever util (#16648)
Signed-off-by: machine424 <ayoubmrini424@gmail.com>
2025-05-30 10:28:37 +02:00