16324 Commits

Author SHA1 Message Date
beorn7
d19cc4ddb0 Volunteer @jan--f as release shepherd for v3.8
Signed-off-by: beorn7 <beorn@grafana.com>
2025-10-28 12:45:50 +01:00
Julius Volz
5318689046
Merge pull request #17380 from roidelapluie/roidelapluie/fixat
promql/parser: Add string representation for AT token
2025-10-27 16:21:14 +01:00
Minh Nguyen
ad4b59c504
tsdb: Deprecate retention flags; add tsdb.retention runtime configuration (#17026)
* Move storage from CL to config file

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* Fix .md

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* run make cli-documentation

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* fix

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* run make cli-documentation

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* nit_fixed

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* fix

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* add test and update configuration.md

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* fix lint

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

---------

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
2025-10-27 14:51:33 +00:00
Minh Nguyen
6bb367970e
feat(promtool): add RW2 support to promtool push metrics using client_golang library (#17280)
* Add WriteProto method and tests for promtool metrics

This commit adds:
1. WriteProto method to storage/remote/client.go that handles
   marshaling and compression of protobuf messages
2. Updated parseAndPushMetrics in cmd/promtool/metrics.go to use
   the new WriteProto method
3. Comprehensive tests for PushMetrics functionality

The WriteProto method provides a cleaner API for sending protobuf
messages without manually handling marshaling and compression.

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* use Write method from exp/api/remote

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* fix

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* fix lint

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* fix test

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* fix

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* nit fixed

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* fix lint

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

---------

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
2025-10-27 13:56:48 +00:00
Julius Volz
dca3289c28
Merge pull request #17334 from roidelapluie/roidelapluie/explain
UI: Add smoothed/anchored in explain
2025-10-27 14:11:36 +01:00
Julien
de23c5a856
Merge pull request #17404 from sylr/template-urlQueryEscape
Add urlQueryEscape to template functions
2025-10-27 13:41:23 +01:00
Sylvain Rabot
50de066a7e
Add urlQueryEscape to template functions
Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
2025-10-27 10:47:29 +01:00
dependabot[bot]
817dde743c
chore(deps): bump github.com/grpc-ecosystem/grpc-gateway/v2 (#17266)
Bumps [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway) from 2.27.1 to 2.27.2.
- [Release notes](https://github.com/grpc-ecosystem/grpc-gateway/releases)
- [Changelog](https://github.com/grpc-ecosystem/grpc-gateway/blob/main/.goreleaser.yml)
- [Commits](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.27.1...v2.27.2)

---
updated-dependencies:
- dependency-name: github.com/grpc-ecosystem/grpc-gateway/v2
  dependency-version: 2.27.2
  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-24 16:50:53 +02:00
Linas Medžiūnas
042fe9d6bd
promql: benchmark for join queries with more labels (#17130)
* promql: benchmark for join queries with more labels

Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>

* Add benchmark case for GROUP_LEFT

Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>

* Address PR feedback

Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>

---------

Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
2025-10-24 13:08:01 +01:00
George Krajcsovits
d237230334
Merge pull request #17232 from prometheus/krajo/nh-stable
feat(nh): mark native histograms as stable and keep optional
2025-10-24 12:49:46 +02:00
György Krajcsovits
18efd9d629
feat(ui): mark native histograms as stable in ui strings
Plus some docstrings

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2025-10-24 12:32:15 +02:00
György Krajcsovits
c929578718
feat(nh): mark native histograms as stable in docs
Fixes: #16572

Mark as stable means that breaking changes are only allowed together with
major version release of Prometheus.

Co-authored-by: Björn Rabenstein <beorn@grafana.com>
Signed-off-by: George Krajcsovits <krajorama@users.noreply.github.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2025-10-24 12:31:42 +02:00
Björn Rabenstein
0ac71624cb
Merge pull request #17390 from prymitive/sample_limit
Include histograms in sample_limit logic
2025-10-24 12:07:06 +02:00
Minh Nguyen
f070e35358
[RW]: Adopt client_golang/exp/api/remote types for receiving RW1 and RW2 (#17197)
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

# Conflicts:
#	storage/remote/write_handler.go

* add comment

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* fix

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* fix failling test

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* nit_fixing

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* fix comment

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

---------

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
2025-10-24 10:31:34 +01:00
Lukasz Mierzwa
aac472df5b Fix TestScrapeLoop_HistogramBucketLimit
TestScrapeLoop_HistogramBucketLimit tests the bucket limiter but it also sets sample_limit to the same value, which seems incorrect.

Signed-off-by: Lukasz Mierzwa <l.mierzwa@gmail.com>
2025-10-24 10:04:18 +01:00
Lukasz Mierzwa
ce520b9256 Include histograms in sample_limit logic
Currently histograms bypass sample_limit logic as the limitAppender only implements the Append() method, while histograms are appended using AppendHistogram.
This means that they are effectively ignored during sample_limit checks and a scrape with sample_limit=100 and 500 histograms will accept all samples.
Add AppendHistogram method to the limitAppender so histograms are also counted towards sample_limit.

Signed-off-by: Lukasz Mierzwa <l.mierzwa@gmail.com>
2025-10-24 10:04:18 +01:00
Linas Medžiūnas
20815562d2
[BUGFIX] PromQL: fix more slice indexing bugs in info function (#17199)
* [BUGFIX] PromQL: fix more slice indexing bugs in info function

---------

Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
2025-10-23 17:39:22 +02:00
Julius Hinze
05612757b4
prometheusremotewrite: fix require.equal argument order (#17391)
Signed-off-by: Julius Hinze <julius.hinze@grafana.com>
2025-10-23 15:13:32 +02:00
Julien
ca00c97497
Merge pull request #17392 from prometheus/superq/rm_circleci
Remove obsolete CircleCI config
2025-10-23 15:03:01 +02:00
SuperQ
ab7f2d0b24
Remove obsolete CircleCI config
Builds have been stopped, we can remove the CircleCI config file.

Signed-off-by: SuperQ <superq@gmail.com>
2025-10-23 14:47:03 +02:00
Julius Volz
ae83804ab0
docs: Minor formatting/typo fixes in the HTTP API docs (#17339)
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2025-10-23 09:48:36 +00:00
zenador
87eb072c0a
Move unit tests for info function from go file to testdata (#17307)
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2025-10-23 11:47:42 +02:00
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
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
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