16324 Commits

Author SHA1 Message Date
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
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
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
György Krajcsovits
ea398c15e8
Merge branch 'release-3.7' into krajo/merge-release-3071-to-main 2025-10-17 10:45:55 +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
harsh kumar
16a9a827de
remote-write: Add type and unit labels to 2.0 receiver when feature flag enabled (#17329)
* feat(remote): add support for type and unit labels in write handler

Signed-off-by: Harsh <harshmastic@gmail.com>

* minor fixes

Signed-off-by: Harsh <harshmastic@gmail.com>

* fix failing tests

Signed-off-by: Harsh <harshmastic@gmail.com>

* Update storage/remote/write_handler.go

Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: harsh kumar <135993950+hxrshxz@users.noreply.github.com>

* Update storage/remote/write_handler.go

Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: harsh kumar <135993950+hxrshxz@users.noreply.github.com>

* refactor: streamline label handling for type and unit in write handler tests

Signed-off-by: Harsh <harshmastic@gmail.com>

* test: enhance V2 message tests for type and unit labels

Signed-off-by: Harsh <harshmastic@gmail.com>

---------

Signed-off-by: Harsh <harshmastic@gmail.com>
Signed-off-by: harsh kumar <135993950+hxrshxz@users.noreply.github.com>
Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
2025-10-15 18:19:41 +01:00
Augustin Husson
e67218a39e
feat(ui): Support anchored and smoothed keyword in promql editor (#17239)
* feat(ui): Support anchored and smoothed keyword in promql editor

Signed-off-by: Augustin Husson <husson.augustin@gmail.com>

* change parser logic about smoothed/anchored expression

Signed-off-by: Augustin Husson <husson.augustin@gmail.com>

---------

Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
2025-10-15 15:46:32 +02:00
Björn Rabenstein
460d19c99a
Merge pull request #17315 from prometheus/beorn7/histogram2
Phase out native histogram feature flag, add scrape config option
2025-10-15 15:30:52 +02:00
George Krajcsovits
16f96dcd45
Merge pull request #17335 from prometheus/krajo/merge-release-307-to-main
merge release 307 to main
2025-10-15 15:04:46 +02:00
beorn7
ad7d1aed99 Phase out native histogram feature flag
The detailed plan for this is laid out in
https://github.com/prometheus/prometheus/issues/16572 .

This commit adds a global and local scrape config option
`scrape_native_histograms`, which has to be set to true to ingest
native histograms.

To ease the transition, the feature flag is changed to simply set the
default of `scrape_native_histograms` to true.

Further implications:

- The default scrape protocols now depend on the
  `scrape_native_histograms` setting.
- Everywhere else, histograms are now "on by default".

Documentation beyond the one for the feature flag and the scrape
config are deliberately left out. See
https://github.com/prometheus/prometheus/pull/17232 for that.

Signed-off-by: beorn7 <beorn@grafana.com>
2025-10-15 14:50:52 +02:00
György Krajcsovits
dffb721529
Merge remote-tracking branch 'origin/release-3.7' into krajo/merge-release-307-to-main 2025-10-15 13:17:49 +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
Jan-Otto Kröpke
fd421dc3b1
feat: Add OpenContainers spec labels to Dockerfile (#16483)
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
2025-10-15 09:34:06 +02:00
beorn7
72960c076d scrape: "Modernize" test files
Applied the analyzer "modernize" to the test files.

$ go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -fix -test ./...

Signed-off-by: beorn7 <beorn@grafana.com>
2025-10-14 19:30:22 +02:00
Fiona Liao
9a5bccbd4b
refactor: make OTEL temporality check easier to read (#16692)
* Make OTEL temporality check easier to read
* Add nolint comment

Signed-off-by: Fiona Liao <fiona.liao@grafana.com>
2025-10-14 13:29:23 +02:00
Bryan Boreham
88811505c6
Merge pull request #17326 from hxrshxz/test-discovery-xds-parallel
test(discovery/xds): speed up tests with t.Parallel()
2025-10-14 12:08:24 +01:00
Bryan Boreham
1e1389bec8
Merge pull request #17327 from prometheus/jkroepke-patch-1
Remove jkroepke from azure MAINTAINERS.md
2025-10-14 12:03:17 +01:00
Björn Rabenstein
a18d18e927
Merge pull request #17331 from prometheus/beorn7/promql
promql: Check 1st histogram's CRH in sum_over_time
2025-10-14 11:22:18 +02:00
beorn7
e80a3e1b21 promql: Check 1st histogram's CRH in sum_over_time
avg_over_time already correctly checked the counter reset hint fo all
histograms, but in sum_over_time, the 1st histogram was missed. In
both cases, the 1st histogram is processed outside the loop.

Signed-off-by: beorn7 <beorn@grafana.com>
2025-10-14 00:56:07 +02:00
beorn7
ff49406cba promql: Expose bug of not checking 1st histogram for CRH
avg_over_time already correctly checked the counter reset hint fo all
histograms, but in sum_over_time, the 1st histogram was missed in the
loop. This commit exposes the bug in a test.

Signed-off-by: beorn7 <beorn@grafana.com>
2025-10-14 00:52:23 +02:00
George Krajcsovits
edbc5cfa06
Merge pull request #17305 from hxrshxz/fix-17224-remove-nhcb-check
Remove obsolete check preventing NHCB and CT zero ingestion
2025-10-13 10:50:53 +02:00
Harsh
4d7d8ebcfa lint fixes
Signed-off-by: Harsh <harshmastic@gmail.com>
2025-10-13 13:59:10 +05:30
harsh kumar
a612cd8954
Update scrape/manager_test.go
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
Signed-off-by: harsh kumar <135993950+hxrshxz@users.noreply.github.com>
2025-10-13 12:41:46 +05:30
harsh kumar
5244b0e3f7
Update scrape/manager_test.go
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
Signed-off-by: harsh kumar <135993950+hxrshxz@users.noreply.github.com>
2025-10-13 00:50:58 +05:30
harsh kumar
a1e163a462
Update scrape/manager_test.go
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
Signed-off-by: harsh kumar <135993950+hxrshxz@users.noreply.github.com>
2025-10-13 00:50:42 +05:30
Harsh
a63414b8e8 suggested changes added
Signed-off-by: Harsh <harshmastic@gmail.com>
2025-10-12 21:29:18 +05:30
Björn Rabenstein
2c2a4314b9
Merge pull request #17320 from prometheus/beorn7/histogram3
model/histogram: Fix checkHistogramCustomBounds to accept -Inf
2025-10-12 16:10:17 +02:00
Jan-Otto Kröpke
4b6635c5cc
Remove azure maintainer from MAINTAINERS.md
Removed Jan-Otto Kröpke as maintainer for azure.

Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
2025-10-12 12:56:53 +02:00