16481 Commits

Author SHA1 Message Date
Ayoub Mrini
504587c724
chore(direct_io): fix constructor's name (#17371)
Signed-off-by: machine424 <ayoubmrini424@gmail.com>
2025-10-23 11:35:16 +02:00
Julien
2063b953c7
Merge pull request #17388 from prometheus/krajo/merge-release-372-to-main
Merge release 3.7.2 back to main
2025-10-23 11:21:06 +02:00
Julius Volz
0d527b07d7
Merge pull request #17389 from prometheus/fix-revert-route-prefix-change
Revert "UI: fix redirect when web.routePrefix configured"
2025-10-23 10:08:26 +02:00
Arve Knudsen
673a182139
Add Renovate configuration (#16654)
* Add Renovate configuration

---------

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Jan-Otto Kröpke <mail@jkroepke.de>
2025-10-23 09:56:44 +02:00
Julius Volz
5449af70af Revert "UI: fix redirect when web.routePrefix configured"
This reverts commit 93887a9b82a71613067ff0706248c18fe131c5b0.

See discussion at https://github.com/prometheus/prometheus/pull/17240 - I had
thought this was a simple and clear bugfix, but multiple people were depending
on the previous behavior already, and we want to err on the side of stability.

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2025-10-23 09:43:07 +02:00
Linas Medžiūnas
b2e7938e25
[BUGFIX] PromQL: avoid panic parsing malformed info call (#17379)
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
2025-10-23 09:42:19 +02:00
György Krajcsovits
fbd5353a19
Merge remote-tracking branch 'origin/release-3.7' into krajo/merge-release-372-to-main 2025-10-22 18:02:22 +02:00
George Krajcsovits
7f2e7c86f8
prepare release 3.7.2 (#17385)
* prepare release 3.7.2


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

* Update CHANGELOG.md

Co-authored-by: Julien <291750+roidelapluie@users.noreply.github.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: Julien <291750+roidelapluie@users.noreply.github.com>
v0.307.2 v3.7.2
2025-10-22 14:31:56 +02:00
dependabot[bot]
3d2d847e77
chore(deps): bump actions/setup-go from 5.5.0 to 6.0.0 (#17259)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5.5.0 to 6.0.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](d35c59abb0...4469467582)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-22 11:34:20 +02:00
dependabot[bot]
0ef13ac7c6
chore(deps): bump actions/setup-node from 4.4.0 to 5.0.0 (#17261)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4.4.0 to 5.0.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](49933ea528...a0853c2454)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-22 11:33:44 +02:00
dependabot[bot]
31b435bf50
chore(deps): bump github.com/daixiang0/gci in /internal/tools (#17267)
Bumps [github.com/daixiang0/gci](https://github.com/daixiang0/gci) from 0.13.6 to 0.13.7.
- [Release notes](https://github.com/daixiang0/gci/releases)
- [Commits](https://github.com/daixiang0/gci/compare/v0.13.6...v0.13.7)

---
updated-dependencies:
- dependency-name: github.com/daixiang0/gci
  dependency-version: 0.13.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-22 11:33:32 +02:00
George Krajcsovits
7dcd4f5e4e
Merge pull request #17383 from prometheus/krajo/backport-pr17354
backport 3.7: Fix formatting of range vector selectors with smoothed/anchored modifier
2025-10-22 11:23:23 +02:00
Julius Volz
88b009f8a0
Disable extended range selector modifiers again after test run
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2025-10-22 11:04:45 +02:00
Julius Volz
a1000efe55
Fix formatting of range vector selectors with smoothed/anchored modifier
The modifiers were already printed as part of the VectorSelector, so for:

`foo[5m] anchored`

...the output was:

`foo anchored[5m] anchored`

Similar to how it was already done for `@` and `offset`, I now removed these
modifiers in the copy of the vector selector that is used to print the matrix
selector. I also removed some unused code that restored the copy of the vector
selector after overwriting its fields. AFAICS there was no use in doing that,
since it was a copy already that would just be thrown away after printing, and
the original selector wasn't affected. I also removed an erroneous comment in
`atOffset()` where no actual copying took place and no fields were overwritten.

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2025-10-22 11:04:34 +02:00
George Krajcsovits
d06c96136d
Merge pull request #17376 from sysadmind/fix-17375
discovery/aws: Fix region load from IMDS
2025-10-22 11:02:56 +02:00
George Krajcsovits
34360d3068
Merge pull request #17372 from roidelapluie/roidelapluie/relabeling
relabeling: Fix labelmap action validation with legacy metric name scheme
2025-10-22 11:01:19 +02:00
George Krajcsovits
1ae15f2037
Merge pull request #17382 from prometheus/krajo/backport-pr17353
backport 3.7: promql: allow 'anchored' and 'smoothed' as metric and label names
2025-10-22 11:00:22 +02:00
dependabot[bot]
29c3efa57f
chore(deps): bump github.com/bufbuild/buf in /internal/tools (#17268)
Bumps [github.com/bufbuild/buf](https://github.com/bufbuild/buf) from 1.51.0 to 1.57.2.
- [Release notes](https://github.com/bufbuild/buf/releases)
- [Changelog](https://github.com/bufbuild/buf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bufbuild/buf/compare/v1.51.0...v1.57.2)

---
updated-dependencies:
- dependency-name: github.com/bufbuild/buf
  dependency-version: 1.57.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-22 10:38:19 +02:00
dependabot[bot]
a20c381649
chore(deps): bump ossf/scorecard-action from 2.4.2 to 2.4.3 (#17257)
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.4.2 to 2.4.3.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](05b42c6244...4eaacf0543)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-version: 2.4.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-22 10:36:52 +02:00
dependabot[bot]
40fe032238
chore(deps): bump github/codeql-action from 3.29.2 to 3.30.5 (#17258)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.2 to 3.30.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](181d5eefc2...3599b3baa1)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.30.5
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-22 10:29:26 +02:00
dependabot[bot]
e18053fa8a
chore(deps): bump actions/cache from 4.2.3 to 4.3.0 (#17260)
Bumps [actions/cache](https://github.com/actions/cache) from 4.2.3 to 4.3.0.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](5a3ec84eff...0057852bfa)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: 4.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-22 10:28:45 +02:00
dependabot[bot]
77225a6aca
chore(deps): bump actions/setup-go from 5.5.0 to 6.0.0 in /scripts (#17262)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5.5.0 to 6.0.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](d35c59abb0...4469467582)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-22 10:27:57 +02:00
dependabot[bot]
fc662265d3
chore(deps): bump google.golang.org/api from 0.250.0 to 0.251.0 (#17264)
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.250.0 to 0.251.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.250.0...v0.251.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-version: 0.251.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-22 10:27:27 +02:00
Julien Pivotto
c9d4689e0b relabeling: Fix labelmap action validation with legacy metric name scheme
Fixes #17370

In Prometheus v3.7.0, using labelmap actions with replacement patterns
containing regex variables (e.g., `$1`, `${1}`) would fail validation
when `metric_name_validation_scheme` was set to `legacy`, causing
Prometheus to fail at startup with:
  "$1" is invalid 'replacement' for labelmap action

This was a regression as the same configuration worked in v3.6.0.

The issue was in the validation logic: while UTF-8 validation correctly
allowed `$` characters, legacy validation incorrectly used
`IsValidLabelName` which rejects `$` characters. The fix ensures legacy
validation uses `relabelTargetLegacy` regex which explicitly supports
regex template variables.

Added test cases to verify labelmap validation works with both `$1` and
`${1}` replacement patterns under legacy validation scheme.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2025-10-22 10:13:06 +02:00
Matthias Loibl
9a0422cf02
Merge pull request #17256 from marvin-roesch/mixin/dashboard-uids
mixin: add uid to remote write dashboard
2025-10-22 09:22:49 +02:00
Julien Pivotto
0fa1e00dad
promql: allow 'anchored' and 'smoothed' as metric and label names
Add ANCHORED and SMOOTHED keywords to the maybe_label and
metric_identifier rules in the parser grammar, allowing them
to be used as metric names and label names, similar to other
keywords like 'offset', 'step', and 'bool'.

This fixes an issue where expressions like `anchored{job="test"}`
and `sum by (smoothed) (some_metric)` would fail to parse.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2025-10-22 09:18:03 +02:00
George Krajcsovits
1195563b31
Merge pull request #17355 from roidelapluie/ec2_discovery
discovery/aws: Fix AWS SDK v2 credentials handling for EC2 and Lightsail discovery
2025-10-22 08:46:27 +02:00
Arve Knudsen
ef42c088ba
OTLP: Add configuration parameters to control label name translation (#17345)
As a follow-up to #17344, add two configuration parameters for controlling label
name translation, both defaulting to on for backwards compatibility (currently
these behaviours are hardcoded as enabled):

* otlp.label_name_underscore_sanitization => Prefix label names starting with a
  single underscore with key_ when translating OTel attribute names
* otlp.label_name_preserve_multiple_underscores => Keep multiple consecutive
  underscores in label names when translating OTel attribute names

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2025-10-22 08:27:35 +02:00
Joe Adams
6f9af6651e
Update lightsail to use IMDS for region
Signed-off-by: Joe Adams <github@joeadams.io>
2025-10-21 20:31:55 -04:00
Julien Pivotto
8d4876f944 promql/parser: Add string representation for AT token
Add the "@" string representation for the AT token in ItemTypeStr map to
ensure proper token-to-string conversion.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2025-10-21 16:50:56 +02:00
Joe Adams
a425442c1c
Add IMDS go dep
Signed-off-by: Joe Adams <github@joeadams.io>
2025-10-20 22:51:14 -04:00
Joe Adams
7a29bd2cb4
discovery/aws: Fix region load from IMDS
Loading the local region from the Instance MetaData Service broke in v3.7. This adds the IMDS call back in order to load the local region when no other method has set the region.

fixes #17375

Signed-off-by: Joe Adams <github@joeadams.io>
2025-10-20 22:47:07 -04:00
Björn Rabenstein
6fd6098a9d
Merge pull request #17360 from prometheus/beorn7/histogram
prompb: Remove 'experimental' from native histograms
2025-10-20 19:59:13 +02:00
Julien Pivotto
02985d2ddd Add anchored/smoothed to explain
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2025-10-20 13:37:39 +02:00
Akshat Sinha
3107bdc2ea
docs(changelog): fix typo in 3.7.0 release notes (#17368)
Corrects BUGIFX to BUGFIX for remote-write panic fix entry.

Signed-off-by: Akshat Sinha <akshatsinhasramhardy@gmail.com>
2025-10-20 04:29:26 +00:00
Julius Volz
4c1355e14b
Merge pull request #17365 from akshatsinha0/fix/old-ui-createExpressionLink
fix(react-app): correct createExpressionLink query for /graph links
2025-10-19 13:14:19 +02:00
Akshat Sinha
ce175905a5 fix(react-app): correct createExpressionLink query for /graph links
Ensure params are joined with & and remove trailing dot to restore working links from Alerts/Rules to Graph.

Signed-off-by: Akshat Sinha <akshatsinhasramhardy@gmail.com>
2025-10-19 04:08:31 +05:30
beorn7
c78a4e0382 prompb: Remove 'experimental' from native histograms
Signed-off-by: beorn7 <beorn@grafana.com>
2025-10-18 21:08:46 +02:00
Linas Medžiūnas
44df626620
promql (histograms): reconcile mismatched NHCB bounds (#17278)
Fixes #17255.

The implementation happens mostly in the Add and Sub method, but the reconciliation works for all relevant operations. For example, you can now `rate` over a range wherein the custom bucket boundaries are changing.

Any custom bucket reconciliation is flagged with an info-level annotation.

---------

Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
Signed-off-by: Linas Medžiūnas <linasm@users.noreply.github.com>
2025-10-18 01:03:52 +02:00
Julius Volz
09e7111aa7
UI: Fix double-loading of API data on pages with slow rendering (#17357)
Without `staleTime: Infinity`, the query data would be immediately marked
stale, and in combination with the `gcTime: 0` setting and a brief unmount
during data loading (via Suspense), the data would have to be reloaded a second
time during/after the first real render.

`gcTime: 0` + `staleTime: Infinity` should give us the desired behavior where
data loaded for a page should be valid forever as long as that page is being
displayed, but always thrown away (and later reloaded) whenever we navigate
away and again to that page.

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2025-10-17 17:17:48 +02:00
Julien Pivotto
c40a574197 discovery/ec2: Fix AWS SDK v2 credentials handling for EC2 and Lightsail discovery
After the upgrade to AWS SDK v2, the EC2 and Lightsail service discovery
stopped working when using the default AWS credential chain (environment
variables, IAM roles, EC2 instance metadata, etc.).

The issue was that the code unconditionally created a StaticCredentialsProvider
with empty credentials when access_key and secret_key were not configured. In
AWS SDK v2, this causes a "static credentials are empty" error and prevents
the SDK from falling back to its default credential chain.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2025-10-17 15:52:40 +02:00
Julius Volz
a3e404755b
Merge pull request #17354 from prometheus/fix-smoothed-anchored-formatting
Fix formatting of range vector selectors with smoothed/anchored modifier
2025-10-17 13:36:24 +02:00
Julius Volz
8bbfdf212c
Merge pull request #17353 from roidelapluie/anchored_smoothed_name_label
promql: allow 'anchored' and 'smoothed' as metric and label names
2025-10-17 12:33:03 +02:00
Julius Volz
9d7d544be1 Disable extended range selector modifiers again after test run
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2025-10-17 12:30:57 +02:00
Julius Volz
b7c3a2194f Fix formatting of range vector selectors with smoothed/anchored modifier
The modifiers were already printed as part of the VectorSelector, so for:

`foo[5m] anchored`

...the output was:

`foo anchored[5m] anchored`

Similar to how it was already done for `@` and `offset`, I now removed these
modifiers in the copy of the vector selector that is used to print the matrix
selector. I also removed some unused code that restored the copy of the vector
selector after overwriting its fields. AFAICS there was no use in doing that,
since it was a copy already that would just be thrown away after printing, and
the original selector wasn't affected. I also removed an erroneous comment in
`atOffset()` where no actual copying took place and no fields were overwritten.

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2025-10-17 12:23:53 +02:00
Julien Pivotto
99c926b810 promql: allow 'anchored' and 'smoothed' as metric and label names
Add ANCHORED and SMOOTHED keywords to the maybe_label and
metric_identifier rules in the parser grammar, allowing them
to be used as metric names and label names, similar to other
keywords like 'offset', 'step', and 'bool'.

This fixes an issue where expressions like `anchored{job="test"}`
and `sum by (smoothed) (some_metric)` would fail to parse.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2025-10-17 12:10:52 +02:00
Bryan Boreham
42b52ecc4b TSDB: Allocate series ID after seriesLifecycleCallback
This callback is not used by Prometheus, but in downstream projects it
is wasteful to allocate an ID only to abandon it.

Remove lengthy commment which I feel is distracting from the flow.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2025-10-17 11:06:22 +01:00
George Krajcsovits
a28ec9aca0
Merge pull request #17350 from prometheus/krajo/merge-release-3071-to-main
merge release 3.7.1 to main
2025-10-17 11:46:59 +02:00
Bryan Boreham
2852c9c431 [REFACTOR] TSDB: Simplify series creation
Refactor the code so that everything proceeds linearly.

Also renamed `getOrSet` to `setUnlessAlreadySet` to emphasise that the
caller is expecting it not to be set.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2025-10-17 10:46:22 +01:00
Julius Volz
da17fe5a9c
Merge pull request #17282 from SRasaikar/srasaikar/Issue_#4510
rules: add unknown state for unevaluated alerting rules
2025-10-17 11:17:31 +02:00