16217 Commits

Author SHA1 Message Date
George Krajcsovits
0a41f00007
prepare release 3.7.3 (#17428)
various bug fixes

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
v0.307.3 v3.7.3
2025-10-30 08:21:26 +01:00
Ayoub Mrini
6806b68f93
[release-3.7] fix: Remote-write: revert changes in the queue resharding logic (#17412)
* Revert "chore: deprecate prometheus_remote_storage_{samples,exemplars,histograms}_in_total and prometheus_remote_storage_highest_timestamp_in_seconds"

This reverts commit ba14bc49db31a1b0ba3127e6ddf59a9f32a08dff.

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

* Revert "storage/remote: compute highestTimestamp and dataIn at QueueManager level"

This reverts commit 184c7eb9186aa8fea09920f2f8e8aa8a603da300.

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

* fix(remote-write): bring back the per queue metrics

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

* test(remote): add TestRemoteWrite_ReshardingWithoutDeadlock to reproduce the sharding scale up deadlock

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

---------

Signed-off-by: machine424 <ayoubmrini424@gmail.com>
2025-10-29 14:04:09 +00:00
Arve Knudsen
92ccadc96d
promtool: generate rulesLintConfig when --lint=none is set (#17414)
* Correctly generate rulesLintConfig when --lint=none is set (#17399)

If I run promtool check config --lint=none I get:

```
Checking rules.yml
  FAILED:
rules.yml: unset nameValidationScheme
```

This is because passing --lint=none stops newConfigLintConfig from generating rulesLintConfig which is needed for validation.
It means that defaults are used then, one of which is unset value for metric name validation, causing this error.
Fix this by handling --lint=none case correctly and still generating rulesLintConfig.

---------

Signed-off-by: Lukasz Mierzwa <l.mierzwa@gmail.com>
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Łukasz Mierzwa <l.mierzwa@gmail.com>
2025-10-28 14:34:52 +01:00
George Krajcsovits
436ae330ff
fix(deps): update prometheus/common to 0.67.1 (#17409)
Fix #17405 federation of NHCB histograms

Manual backport of #17299

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2025-10-28 12:06:32 +01: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
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
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
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
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
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
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
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
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
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
George Krajcsovits
0aeb4fddc9
Merge pull request #17346 from prometheus/krajo/prepare-release-3.7.1
prepare bugfix release 3.7.1
v3.7.1 v0.307.1
2025-10-17 08:20:21 +02:00
George Krajcsovits
2617f30775
Merge pull request #17344 from aknuds1/arve/add-otlptranslator-params
OTLP: re-enable label name underscore sanitization and keeping of multiple underscores
2025-10-17 08:19:44 +02:00
György Krajcsovits
7477dabcdf
prepare bugfix release 3.7.1
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2025-10-16 17:29:09 +02:00
Arve Knudsen
99d0967133 Fix lint failure
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2025-10-16 16:56:18 +02:00
Arve Knudsen
f5804e7cf2 Remove configuration parameters
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2025-10-16 16:37:24 +02:00
Arve Knudsen
3de3a296dd Add reviewer feedback
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2025-10-16 16:13:08 +02:00
Arve Knudsen
dd3a607d2d Add configuration parameters
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2025-10-16 16:13:08 +02:00
Arve Knudsen
7cf4b5da55 OTLP: Upgrade prometheus/otlptranslator
The upgrade to prometheus/otlptranslator@7f02967de0 fixes two label
name translation bugs, when in legacy name translation mode:
* 'key' is no longer prefixed when label names start with an underscore
* Multiple consecutive underscores are combined into one

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2025-10-16 16:13:08 +02:00
George Krajcsovits
09814effe6
chore(release): prepare for 3.7 release (#17330)
* chore(release): prepare for 3.7 release

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
v0.307.0 v3.7.0
2025-10-15 12:08:05 +02:00
George Krajcsovits
36678c0551
Merge pull request #17274 from prometheus/krajo/prepare-release-3.7
prepare release 3.7-rc.0
v0.307.0-rc.0 v3.7.0-rc.0
2025-10-08 12:15:46 +02:00
György Krajcsovits
736ad1f54f
prepare release 3.7
Bump versions and changelog.

Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com>
Co-authored-by: Ayoub Mrini <ayoubmrini424@gmail.com>

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2025-10-08 12:03:27 +02:00
György Krajcsovits
c4b63ab0ae
chore(changelog): fix changelog
16737 was in 3.6.
16923 lacked number and a bit underdefined.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2025-10-08 12:03:25 +02:00
Björn Rabenstein
dc5108abb5
Merge pull request #17300 from prometheus/beorn7/testing
tsdb: Disable more tests on MS Windows
2025-10-07 17:38:56 +02:00
beorn7
e2aed2cd27 tsdb: Disable more tests on MS Windows
Signed-off-by: beorn7 <beorn@grafana.com>
2025-10-07 16:34:59 +02:00
Björn Rabenstein
3c9605263e
Merge pull request #17296 from prometheus/beorn7/histogram
tsdb: Do not track stFloat in typesInBatch explicitly
2025-10-07 15:24:57 +02:00
Björn Rabenstein
cf0ba36db0
Merge pull request #17295 from prometheus/beorn7/cleanup
tsdb: Remove leftover debug fmt.Println
2025-10-07 15:22:53 +02:00
beorn7
51c8e55835 tsdb: Do not track stFloat in typesInBatch explicitly
Signed-off-by: beorn7 <beorn@grafana.com>
2025-10-07 15:01:22 +02:00
beorn7
5f582a7e1f tsdb: Remove leftover debug fmt.Println
Signed-off-by: beorn7 <beorn@grafana.com>
2025-10-07 14:58:25 +02:00
George Krajcsovits
077abc5cca
Merge pull request #17291 from prometheus/krajo/pick-pr-17290
perf(tsdb): reuse map of sample types to speed up head appender
2025-10-07 09:30:33 +02:00
György Krajcsovits
d11ee103ac
perf(tsdb): reuse map of sample types to speed up head appender
While investigating +10% CPU in v3.7 release, found that ~5% is from
expanding the types map. Try reuse.

Also fix a linter error.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2025-10-07 08:31:20 +02:00
George Krajcsovits
5c897e3801
Merge pull request #17244 from prometheus/krajo/update-npm-deps
chore(deps): update npm dependencies before release
2025-10-01 11:31:08 +02:00
György Krajcsovits
63fb211946
chore(deps): update npm dependencies before release
make update-npm-deps

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2025-10-01 10:58:29 +02:00
George Krajcsovits
58a42623d8
Merge pull request #17253 from prometheus/krajo/merge-release-306-to-main
merge release 306 to main
2025-10-01 10:54:09 +02:00
György Krajcsovits
e752e733e1
Merge remote-tracking branch 'origin/release-3.6' into krajo/merge-release-306-to-main
# Conflicts:
#	CHANGELOG.md
#	tsdb/head_test.go
2025-10-01 10:35:29 +02:00
Patryk Prus
dc3e6af91a
tsdb: Fix appended sample count metrics when converting float staleness markers to histograms (#17241)
tsdb: Fix appended sample count metrics when converting histogram staleness markers

Signed-off-by: Patryk Prus <p@trykpr.us>
Signed-off-by: Björn Rabenstein <github@rabenste.in>
Co-authored-by: Björn Rabenstein <github@rabenste.in>
2025-09-30 16:49:54 +00:00
Julius Volz
cc7b1de372
Merge pull request #17240 from LittleFox94/fix-web-redirect
UI: fix redirect when web.routePrefix configured
2025-09-30 18:15:39 +02:00
Bryan Boreham
30abb29b21
Merge pull request #17242 from bboreham/lookback-param
[DOCS] API: Document the lookback_delta parameter
2025-09-30 14:58:59 +01:00
Arthur Silva Sens
8f8304a2ad
Update go modules (#17243)
* Update go modules

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

* Update semconv

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

* Force go version 1.24.0

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

* Revert incorrect prometheus bump

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

---------

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
2025-09-30 10:19:32 -03:00
Bryan Boreham
7056c70647
Merge pull request #16851 from jingchanglu/main
chore: fix some function names in comment
2025-09-30 12:54:48 +01:00