1418 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
Julius Volz
8b1bd7d6c3 ui: Allow viewing detailed relabeling steps for each discovered target
This adds:

* A `ScrapePoolConfig()` method to the scrape manager that allows getting
  the scrape config for a given pool.
* An API endpoint at `/api/v1/targets/relabel_steps` that takes a pool name
  and a label set of a target and returns a detailed list of applied
  relabeling rules and their output for each step.
* A "show relabeling" link/button for each target on the discovery page
  that shows the detailed flow of all relabeling rules (based on the API
  response) for that target.

Note that this changes the JSON encoding of the relabeling rule config
struct to output the original snake_case (instead of camelCase) field names,
and before merging, we need to be sure that's ok :) See my comment about
that at https://github.com/prometheus/prometheus/pull/15383#issuecomment-3405591487

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

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2025-10-15 15:33:27 +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>
2025-10-15 12:08:05 +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
Sahil Rasaikar
516afbea67 Init Commit: fix for issue #4510
Signed-off-by: Sahil Rasaikar <sahil.rasaikar@gmail.com>
2025-10-05 17:15:32 +05:30
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
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
ADITYATIWARI342005
3ef9f4e18a ui: rename ScrapeDetails→ScrapeTimingDetails; refine labels per review
Rename component for clarity (timing-only focus)
Chevron title: “Show/Hide additional timing info”
Duration pill tooltip: “Duration of last target scrape”
Update imports/usages; keep DOM-conditional expanded content

Signed-off-by: ADITYATIWARI342005 <142050150+ADITYATIWARI342005@users.noreply.github.com>
2025-09-29 20:45:52 +05:30
ADITYATIWARI342005
8eb8758925 ui: Add expandable scrape interval and timeout to targets page
Implements expand/collapse functionality for displaying final scrape
configuration (interval + timeout) in the targets page timing column.
- Add ScrapeDetails component with expand/collapse chevron
- Keep existing "Last Scrape" and "Scrape Duration" badges always visible
- Display "Scrape interval: every \<interval\>" and "Scrape timeout: after \<timeout\>" when expanded
- Use IconRepeat for interval and IconPlugConnectedX for timeout
- Follow TargetLabels.tsx pattern for consistency
- Implement performance optimization with conditional DOM rendering
- Maintain existing hover tooltip functionality

Signed-off-by: ADITYATIWARI342005 <142050150+ADITYATIWARI342005@users.noreply.github.com>
2025-09-28 01:18:26 +05:30
machine424
65b1cd5ae2
chore: prepare release 3.6.0
Signed-off-by: machine424 <ayoubmrini424@gmail.com>
2025-09-17 09:20:59 +02:00
machine424
dfb24f4ba0
chore: prepare release 3.6.0-rc.1
Signed-off-by: machine424 <ayoubmrini424@gmail.com>
2025-09-09 15:24:28 +02:00
Ayoub Mrini
6a5abd6b4b
Merge pull request #17080 from Duciwuci/bump-go-ci
chore: Bump Go min version to 1.24
2025-09-09 14:31:18 +02:00
Arve Knudsen
913cc8f72b
Replace gopkg.in/yaml.v2 with go.yaml.in/yaml/v2 (#17151)
* Replace gopkg.in/yaml.v2 with go.yaml.in/yaml/v2
* Upgrade to client_golang@v1.23.2

---------

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2025-09-06 13:04:24 +02:00
Duciwuci
070ffd7edb bump go version across all stages
Signed-off-by: Duciwuci <duciwuci@gmail.com>
2025-09-02 10:02:39 +02:00
Craig Ringer
1ce84d8e2f feat(promql): add first_over_time and ts_of_first_over_time
Add a first_over_time function, and corresponding ts_of_first_over_time
function.  Both are behind the experimental functions feature flag.

Signed-off-by: Craig Ringer <craig.ringer@enterprisedb.com>
2025-09-02 10:24:31 +12:00
machine424
157ed00d9d chore: prepare release 3.6.0-rc.0
Signed-off-by: machine424 <ayoubmrini424@gmail.com>
2025-08-21 15:28:03 +02:00
Julius Volz
13b55ffc81
UI: More inclusive metadata handling for _count/_sum/_bucket suffixes (#16910)
Although these suffixes always need to be removed before querying metadata for
metrics that follow the Prometheus naming best practices, there can also be
metrics that don't follow these naming practices and have these suffixes
without being part of either a histogram or a summary metric.

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

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2025-07-24 13:54:58 +02:00
Julius Volz
1354bb90be Make query warning/info notice display configurable
Fixes https://github.com/prometheus/prometheus/issues/16888

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2025-07-21 13:03:46 +02:00
Bryan Boreham
36ec1e4fb0
Merge branch 'main' into merge-3.5-into-main
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2025-07-14 15:29:00 +01:00
Bryan Boreham
8be3a9560f Prepare release 3.5.0
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2025-07-14 12:38:42 +01:00
Bryan Boreham
eea203702c
Prepare release 3.5.0-rc.1 (#16845)
This RC reverts the feature "OTLP: Support promoting OTel scope attributes".

Add the line back into the CHANGELOG for 3.5.0-rc.0, since we are not changing that version.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2025-07-09 12:07:27 +01:00
wmTJc9IK0Q
c481aaf762
codemirror-promql: Preserve source files in npm package (#16804)
* Preserve source files in codemirror-promql package

This allows for sourcemaps to work when the package is imported via ESM-native CDNs such as esm.sh

Signed-off-by: wmTJc9IK0Q <171362836+wmTJc9IK0Q@users.noreply.github.com>

* Preserve source files in lezer-promql package

Signed-off-by: wmTJc9IK0Q <171362836+wmTJc9IK0Q@users.noreply.github.com>

---------

Signed-off-by: wmTJc9IK0Q <171362836+wmTJc9IK0Q@users.noreply.github.com>
2025-07-02 15:31:02 +02:00
Bryan Boreham
31f0c7007e
Prepare release 3.5.0-rc.0 (#16778)
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
Co-authored-by: Julius Volz <julius.volz@gmail.com>
2025-06-30 14:19:45 +01:00
Jan-Otto Kröpke
5a1deb84cc
Merge branch 'release-3.4' into release-3.4-main
# Conflicts:
#	CHANGELOG.md
2025-06-26 22:54:24 +02:00
Jan-Otto Kröpke
b392caf256
Prepare release 3.4.2
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
2025-06-26 22:48:39 +02:00
Julien Pivotto
7f2946ccdd mantine-ui: add query info warnings display to graph view
Followup of https://github.com/prometheus/prometheus/pull/16753

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2025-06-20 13:47:15 +02:00
Julien Pivotto
8dcb0ba24a mantine-ui: add query warnings display to graph view
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2025-06-19 12:17:25 +02:00