2478 Commits

Author SHA1 Message Date
renovate[bot]
0bbf5c47ac
chore(deps): update dependency ts-jest to v29.4.6 (#17729)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-23 10:17:55 +01:00
Bryan Boreham
950f756e9e Merge remote-tracking branch 'origin/release-3.8' into merge-3.8.1-to-main
Tweak RW2 change for consistency with older lines.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2025-12-19 09:33:41 +00:00
Julius Volz
558b32f3ab
Merge pull request #17714 from anubhav21sharma/anubhav21sharma/feature-duplicate-query-ui
UI: Add support to duplicate query panels
2025-12-18 22:53:22 +01:00
Bryan Boreham
4c7377f543
Update Go dependencies (#17711)
By running `make update-all-go-deps`.

`hashicorp/consul/api` must be held at v1.32.1 because later versions
require Go 1.25 and we choose to ensure that Promethes builds with the
last two versions of Go.

Also: fix compilation errors in remote-write example.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2025-12-18 17:14:14 +00:00
anubhav21sharma
4f04aaccc3 UI: Add support to duplicate query panel
Signed-off-by: anubhav21sharma <anubhav21sharma@gmail.com>
2025-12-18 15:00:44 +00:00
bwplotka
7739353f5d chore: upgrade npm
Signed-off-by: bwplotka <bwplotka@gmail.com>
2025-12-15 16:41:13 +00:00
Aditya Tiwari
109f9409ed
[BugFix] UI : autocomplete metadata for OpenMetrics counter _total metrics (#17682)
* fix: autocomplete metadata for OpenMetrics counter _total metrics

Signed-off-by: ADITYATIWARI342005 <142050150+ADITYATIWARI342005@users.noreply.github.com>

* fix/lint: properly indent the test file

Signed-off-by: ADITYA TIWARI <adityatiwari342005@gmail.com>

* fix/test: exclude expexcted block

Signed-off-by: ADITYA TIWARI <adityatiwari342005@gmail.com>

* fix/test: refacttoor comment for relevance

Signed-off-by: ADITYA TIWARI <adityatiwari342005@gmail.com>

* fix: add openmetrics _total metadata support to autocomplete by extending hybridcomplete’s suffix handling and adding a Jest test that covers the base-name-only metadata scenario for _total counters

Signed-off-by: ADITYA TIWARI <adityatiwari342005@gmail.com>

* fix: break long-comment to separate line, re-trigger workflow

Signed-off-by: ADITYA TIWARI <adityatiwari342005@gmail.com>

* fix: also strip _total when resolving metric metadata in Selector and MetricsExplorer

Signed-off-by: ADITYA TIWARI <adityatiwari342005@gmail.com>

---------

Signed-off-by: ADITYATIWARI342005 <142050150+ADITYATIWARI342005@users.noreply.github.com>
Signed-off-by: ADITYA TIWARI <adityatiwari342005@gmail.com>
2025-12-14 18:41:19 +01:00
Julien
f73aba34cd
Merge pull request #17427 from roidelapluie/roidelapluie/ffapi
API: Add a /api/v1/features endpoint
2025-12-10 10:14:03 +01:00
Julien Pivotto
a5671a002f API: Add a /api/v1/features endpoint
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2025-12-09 16:13:14 +01:00
Julien
e77dd5bec2
Merge pull request #17647 from roidelapluie/roidelapluie/resource-limit-fix
web/api: Add maximum limit validation to TSDB status endpoint
2025-12-09 16:06:09 +01:00
Julien Pivotto
5b26619565 web/api: Add maximum limit validation to TSDB status endpoint
Add a maximum limit of 10,000 to the TSDB status endpoint to prevent
resource exhaustion from excessively large limit values, as we preallocate
[]Stat for up to the limit: `make([]Stat, 0, length)`.

Note that the endpoint acquires a cardinality mutex during
stats calculation, so this can not be run in parallel.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2025-12-09 14:30:08 +01:00
Jan Fajerski
ac5bdd66d7
Merge pull request #17634 from jan--f/sync-release-3.8
Sync branch release-3.8
2025-12-03 21:26:45 +01:00
Julius Volz
39e11f50b2 Fix serialization for empty ignoring() in combination with group_x()
Currently both the backend and frontend printers/formatters/serializers
incorrectly transform the following expression:

```
up * ignoring() group_left(__name__) node_boot_time_seconds
```

...into:

```
up * node_boot_time_seconds
```

...which yields a different result (including the metric name in the result
vs. no metric name).

We need to keep empty `ignoring()` modifiers if there is a grouping modifier
present.

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2025-12-03 14:15:16 +01:00
Jan Fajerski
fae20b73ff Merge branch 'release-3.8' into sync-release-3.8
Conflicts:
	storage/remote/write_handler.go
	storage/remote/write_handler_test.go
            Pick `main`

Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
2025-12-02 14:24:53 +01:00
Jan Fajerski
73b1fda131 prepare release v3.8.0
Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
2025-11-28 21:12:11 +01:00
ADITYA TIWARI
49427cfcd2
Refactor duration regex and remove RegExp.escape polyfill
Removed polyfill for RegExp.escape and updated duration regex.

Signed-off-by: ADITYA TIWARI <142050150+ADITYATIWARI342005@users.noreply.github.com>
2025-11-27 16:40:33 +05:30
ADITYA TIWARI
42418660d3 fix: lint errors in the files; move regex to one-line only
Signed-off-by: ADITYA TIWARI <adityatiwari342005@gmail.com>
2025-11-25 16:30:27 +00:00
ADITYA TIWARI
4fa435fad2 feat: use RegExp.escape polyfill for robust PromQL duration regex; add compound duration test cases
Signed-off-by: ADITYA TIWARI <adityatiwari342005@gmail.com>
2025-11-25 16:13:52 +00:00
ADITYA TIWARI
3b098799d4
Export durationWithUnitRegexp for external use
Signed-off-by: ADITYA TIWARI <142050150+ADITYATIWARI342005@users.noreply.github.com>
2025-11-25 18:31:10 +05:30
ADITYA TIWARI
137f846527
Add tests for durationWithUnitRegexp functionality
Added tests for durationWithUnitRegexp to validate matching of complete durations with units and ensure non-matching cases are correctly identified.

Signed-off-by: ADITYA TIWARI <142050150+ADITYATIWARI342005@users.noreply.github.com>
2025-11-25 18:30:30 +05:30
ADITYA TIWARI
bf76fde0c8
Update duration regex for complete duration matching
Refactor duration regex to match complete durations with units.

Signed-off-by: ADITYA TIWARI <142050150+ADITYATIWARI342005@users.noreply.github.com>
2025-11-25 17:56:35 +05:30
ADITYA TIWARI
04a5a488b8 fix: Suppress autocomplete for duration units when unit already present
- No duration unit suggestions shown if a valid unit follows the digit (e.g. , )
- Adds related test cases

Signed-off-by: ADITYA TIWARI <adityatiwari342005@gmail.com>
2025-11-24 18:03:05 +00:00
ADITYA TIWARI
02f405692e fix: autocomplete suggestions for using cursor position
Signed-off-by: ADITYA TIWARI <adityatiwari342005@gmail.com>
2025-11-24 09:49:08 +00:00
Jan Fajerski
f1b0dd2cdd prepare release v3.8.0-rc.1
Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
2025-11-21 16:12:02 +01:00
Julius Volz
36d054cb2e
UI: Add graph option to start the chart's Y axis at zero (#17565)
To reduce main UI clutter, I added a new settings submenu above the chart
itself for the new setting. So far it only has the one new axis setting, but it
could accommodate further settings in the future.

For now I'm only adding a boolean on/off setting to the UI to set the Y axis to
0 or not. However, the underlying stored URL field is already named
y_axis_min={number} and would support other Y axis minima, in case we want to
support custom values in the UI in the future - but then we'd probably also
want to add an axis maximum and possibly other settings.

Fixes https://github.com/prometheus/prometheus/issues/520

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2025-11-20 14:28:18 +01:00
Jan Fajerski
743116649b prepare release 3.8.0-rc.0
Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
2025-11-13 16:38:46 +01:00
Bartlomiej Plotka
f50ff0a40a
feat: rename CreatedTimestamp to StartTimestamp (#17523)
Partially fixes https://github.com/prometheus/prometheus/issues/17416 by
renaming all CT* names to ST* in the whole codebase except RW2 (this is
done in separate
[PR](https://github.com/prometheus/prometheus/pull/17411)) and
PrometheusProto exposition proto.

```
CreatedTimestamp -> StartTimestamp
CreatedTimeStamp -> StartTimestamp
created_timestamp -> start_timestamp
CT -> ST
ct -> st

```

Signed-off-by: bwplotka <bwplotka@gmail.com>
2025-11-13 14:17:51 +00:00
Minh Nguyen
7ebff91cfd
OTLP Receiver: Only update metadata to WAL when metadata-wal-records feature is enabled (#17472)
OTLP Receiver: Only update metadata to WAL when metadata-wal-records feature is enabled.

---------

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
2025-11-13 09:53:12 +01:00
Jan Fajerski
a2ba619612 ui: make update-npm-deps
Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
2025-11-06 20:06:56 +01:00
Julius Volz
766279791b
Merge pull request #17485 from prometheus/ui/unmount-collapsed-panel-content
UI: Speed up alerts/rules/... pages by not rendering collapsed content
2025-11-06 18:28:35 +01:00
Julius Volz
12c9b0b9d4
UI: Speed up /alerts for many firing alerts via virtual scrolling (#17486)
We already have infinite scrolling for all the rules within a group, but this
adds a second (nested) level of infinite scrolling for the firing alerts within
a rule.

This should further improve the rendering speed for the /alerts page for
Prometheus setups with many firing alerts and when you expand the individual
rule panels that contain those firing alerts.

Fixes https://github.com/prometheus/prometheus/issues/17254

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2025-11-06 15:39:42 +01:00
Julius Volz
18fa5a6c07 Move README-PROMETHEUS.md to correct subdir
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2025-11-06 15:29:46 +01:00
Julius Volz
2b25bbf997 UI: Speed up alerts/rules/... pages by not rendering collapsed content
In contrast to Bootstrap, Mantine's Accordion component didn't remove its
panel contents from the DOM when collapsed, so rendering pages with lots of
collapsed Accordion items was way slower and more resource-intensive in the
new Mantine UI. While I talked to Vitaly from Mantine and he managed to add
unmounting of collapsed panel contents in Mantine 9, this will only be
available next year. So for now, I'm forking over the Accordion component
from Mantine and adding a hacky modification to it that removes contents
for collapsed panels. This fork can be removed after upgrading to Mantine 9
sometime in 2026. I removed all the unnecessary test files and so on and
just kept the core Accordion code files.

This should really help with the following issues:

https://github.com/prometheus/prometheus/issues/17254
https://github.com/prometheus/prometheus/issues/16830

The /alerts and /rules pages should be the most affected since the panels
on those are collapsed by default. The /targets and /service-discovery
pages have expanded panels by default, but I still swapped out the
Accordion implementation for consistency and in case someone collapses a
bunch of panels.

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2025-11-06 11:32:59 +01:00
Julius Volz
1b7fa3e76d
Migrate Mantine v7 -> v8 (#17402)
I followed the migration guide at https://mantine.dev/guides/7x-to-8x/ to
add back both manual timezone handling in the time input, as well as syntax
highlighting in the config code box.

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2025-11-06 09:38:27 +01:00
Ben Kochie
204249fcb5
Update golangci-lint (#17478)
* Update golangci-lint to v2.6.0
* Fixup various linting issues.
* Fixup deprecations.
* Add exception for `labels.MetricName` deprecation.

Signed-off-by: SuperQ <superq@gmail.com>
2025-11-05 13:47:34 +01:00
Augustin Husson
03d0c18c79
Codemirror - TS Prometheus Client: performance improvement when getting label name and values (#17194)
* Codemirror - TS Prometheus Client: don't use lookback interval if not set

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

* TS Prometheus Client: remove usage of series api when getting labels

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

* mock api /api/v1/labels

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

* mock more endpoints and fix tests

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

---------

Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
2025-11-04 15:26:15 +01:00
Minh Nguyen
30992dd032
[RW2] Fix: Only update metadata to WAL when metadata-wal-records feature is enabled (#17470)
* add feature check when UpdateMetadata

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

* add appendMetadata boolean to write_hander

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

* fix

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

---------

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
2025-11-04 08:16:57 +00:00
Ben Kochie
48956f60d7
Update modernize (#17471)
Apply additional Go modernize tool improvements.

Signed-off-by: SuperQ <superq@gmail.com>
2025-11-04 05:13:49 +00:00
Julius Volz
0093e2159e
Merge pull request #17337 from prometheus/ui/visualize-relabel-steps
ui: Allow viewing detailed relabeling steps for each discovered target
2025-11-02 13:51:55 +01:00
György Krajcsovits
b8192127ee
Merge remote-tracking branch 'origin/release-3.7' into krajo/merge-3.7.3-to-main
# Conflicts:
#	CHANGELOG.md
#	storage/remote/queue_manager_test.go
2025-10-30 09:21:25 +01:00
George Krajcsovits
0a41f00007
prepare release 3.7.3 (#17428)
various bug fixes

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2025-10-30 08:21:26 +01:00
György Krajcsovits
bb8b611d2c
Merge remote-tracking branch 'origin/release-3.7' into krajo/merge-release-3.7-pre3-to-main
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2025-10-29 14:32:42 +01: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
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
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
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
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>
2025-10-22 14:31:56 +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
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