2454 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
7056c70647
Merge pull request #16851 from jingchanglu/main
chore: fix some function names in comment
2025-09-30 12:54:48 +01: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
Mara Sophie Grosch
93887a9b82 UI: fix redirect when web.routePrefix configured
Signed-off-by: Mara Sophie Grosch <littlefox@lf-net.org>
2025-09-29 15:55:12 +03:00
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
beorn7
62eda08a6c web: Add NHCB support to federation
This simply fills the classic buckets of the histogram protobuf with
the content of the custom buckets.

Signed-off-by: beorn7 <beorn@grafana.com>
2025-09-25 15:54:27 +02:00
beorn7
aac5cc3d99 web: Trim excessive line length in federate.go
Signed-off-by: beorn7 <beorn@grafana.com>
2025-09-19 00:35:12 +02:00
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