16177 Commits

Author SHA1 Message Date
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
Arthur Silva Sens
24057883a1
Update otlptranslator with new API (#16626)
* Update otlptranslator with new API

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

---------

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
2025-05-29 09:24:02 -03:00
machine424
5ac1e6a656
fix(test): fall back to default direct I/O requirements in tests when statx isn't supported by using a higher lever util
Signed-off-by: machine424 <ayoubmrini424@gmail.com>
2025-05-29 09:35:33 +02:00
Julius Volz
13564c03ef Standardize doc page title handling
See https://groups.google.com/g/prometheus-developers/c/cwL3cM66Em8

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2025-05-28 21:37:27 +02:00
Charles Korn
ab1b1db128
tsdb: fix issue where a new segment file is created for every chunk if WithSegmentSize not called (#16635)
* tsdb: fix issue where a new segment file is created for every chunk

Signed-off-by: Charles Korn <charles.korn@grafana.com>

* Address PR feedback

Signed-off-by: Charles Korn <charles.korn@grafana.com>

---------

Signed-off-by: Charles Korn <charles.korn@grafana.com>
2025-05-28 18:21:59 +02:00
Anand Rajagopal
41d08003c5 refactor: Move 'for' state restoration metrics to defer block
Signed-off-by: Anand Rajagopal <anrajag@amazon.com>
2025-05-28 16:04:49 +00:00
Julius Volz
e597a5af92
Merge pull request #16640 from tongjicoder/main
chore: fix some comments
2025-05-27 17:32:00 +02:00
tongjicoder
4fe20fa340 chore: fix some comments
Signed-off-by: tongjicoder <tongjicoder@icloud.com>
2025-05-27 23:14:41 +08:00
Ayoub Mrini
89a72bf1b5
[BACKPORT-3.4] fix: add reproducer for a dangling-reference issue in parsers and fix (#16633) 2025-05-27 16:21:17 +02:00
Ayoub Mrini
317acb3d68
refactor: use the built-in max/min to simplify the code (#16617)
Signed-off-by: carrychair <linghuchong404@gmail.com>
2025-05-27 14:42:50 +02:00
Zhengke Zhou
45211dc72f
chore: Adjust test and add comment about DNS resolution issue for failing tests (#16200)
* chore: Add comment about DNS resolution issue for failing tests

Signed-off-by: zhengkezhou1 <madzhou1@gmail.com>

* remove unexported-return

Signed-off-by: zhengkezhou1 <madzhou1@gmail.com>

---------

Signed-off-by: zhengkezhou1 <madzhou1@gmail.com>
2025-05-27 14:40:09 +02:00
Ayoub Mrini
44f78bb3c8
Merge pull request #16623 from machine424/reprep
fix: add reproducer for a dangling-reference issue in parsers and fix
2025-05-27 05:24:48 +02:00
Subhramit Basu
44e27a876e
Add parse alerting for rules files (#16601)
Builds over https://github.com/prometheus/prometheus/pull/16462
Addresses comments, adds invalid rules file

Signed-off-by: subhramit <subhramit.bb@live.in>
Co-authored-by: marcodebba <marcodebonis74@gmail.com>
2025-05-26 18:29:34 +02:00
Antonio Jimenez
2834a665ed
Add support for promoting all OTel resource attributes (#16426)
Add support for promoting all OTel resource attributes via `promote_all_resource_attributes`,
except for those ignored using 'ignore_resource_attributes'.

---------

Signed-off-by: Antonio Jimenez <antonjim@thousandEyes.com>
Signed-off-by: Antonio Jimenez <123171955+antonjim-te@users.noreply.github.com>
2025-05-26 18:15:01 +02:00
Joe Harvey
79c9e9348f
ci: address zizmor gh action vulnerabilities (#16530)
* ci: address zizmor gh action vulnerabilities

---------

Signed-off-by: Joe Harvey <51208233+jharvey10@users.noreply.github.com>
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-26 15:38:09 +00:00
bragi92
14fc57e4cf
remote_write azure auth : allow empty client_id to suppport system assigned managed identity (#16421)
* squash (#1)

* remote-write: allow empty azure client_id to support system assigned managed identity

* add blank line for tests

* remote-write: allow empty azure client_id to support system assigned managed identity

Signed-off-by: Kaveesh Dubey <kadubey@microsoft.com>

* add blank line for tests

Signed-off-by: Kaveesh Dubey <kadubey@microsoft.com>

---------

Signed-off-by: Kaveesh Dubey <kadubey@microsoft.com>

* treat empty client_id as system-assigned identity; this is a valid case

Signed-off-by: Kaveesh Dubey <kadubey@microsoft.com>

* rename file 

Signed-off-by: bragi92 <kadubey@microsoft.com>

---------

Signed-off-by: Kaveesh Dubey <kadubey@microsoft.com>
Signed-off-by: bragi92 <kadubey@microsoft.com>
2025-05-24 15:01:49 +02:00
dongjiang
8d9332c199
fix metric_name_escaping_scheme option (#16625) 2025-05-24 14:25:39 +02:00
machine424
50a6efd5ec
fix(model/textparse): Labels(): copy the input to avoid dangling references
Signed-off-by: machine424 <ayoubmrini424@gmail.com>
2025-05-23 11:03:48 +02:00
machine424
2bfbd8a714
fix: add reproducer for a dangling-reference issue in parsers
Signed-off-by: machine424 <ayoubmrini424@gmail.com>
2025-05-22 17:22:51 +02:00
Julien
1d9dfde989
Merge pull request #16041 from prymitive/parenExprEnd
Add a test for aggregation wrapped in ParenExpr
2025-05-22 09:32:17 +02:00
machine424
690c9da817 chore(config): add guidelines for adding a new RuntimeConfig field based on learnings from GoGC addition
Signed-off-by: machine424 <ayoubmrini424@gmail.com>
2025-05-21 16:16:05 +02:00