2496 Commits

Author SHA1 Message Date
Arthur Silva Sens
c980c74f51
Update google/pprof to allow go 1.24.0 (#17843)
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
2026-01-13 06:32:12 +00:00
Bryan Boreham
63b86fa851 Merge branch 'release-3.9' into merge-3.9-into-main 2026-01-08 10:22:01 +00:00
Bryan Boreham
9ec59baffb
Cut v3.9.1 (#17804)
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2026-01-07 16:05:27 +00:00
Bryan Boreham
da754cd240 Merge remote-tracking branch 'origin/release-3.9' into merge-3.9-into-main 2026-01-07 15:51:44 +00:00
Bryan Boreham
cd875bd8c9
Cut release 3.9.0 (#17796)
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2026-01-06 16:30:06 +00:00
renovate[bot]
5b257abc52
chore(deps): update dependency prettier to v3.7.4 (#17782)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-06 14:44:23 +01:00
Julius Volz
fe76e6c297 Remove unneeded state parameter
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2026-01-06 11:00:01 +01:00
Julius Volz
3fc800410a Handle autocomplete replacement better for more node types
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2026-01-06 10:58:44 +01:00
Julius Volz
b532eacae8 Review fixups - also make it work for label names
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2026-01-05 20:09:12 +01:00
Julius Volz
dbb3fc65b6 Replace entire identifier when autocompleting inside of it
When accepting an autocompletion result within an Identifier node (could be a
metric name, function name, keyword, etc.), the inserted completion should
replace the entire Identifier node all the way to its last character, not only
to the current cursor position.

A limitation is that the correct replacement-until-end-of-identifier only works
when e.g. a function name is currently incomplete (which is likely anyway when
trying to replace it with a different one). This is because otherwise the
Identifier node gets replaced with a more specific function node type (like
`Rate`, `SumOverTime`, etc.), and handling all those adds more complexity.

https://github.com/prometheus/prometheus/issues/15839

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2026-01-05 16:10:31 +01:00
Ben Kochie
e14795bbf4
Remove copyright date from headers (#17785)
Remove copyright dates from various files as part of [PROM-50].

[PROM-50]: https://github.com/prometheus/proposals/blob/main/proposals/0050-remove-copyright-dates.md

Signed-off-by: SuperQ <superq@gmail.com>
2026-01-05 13:46:21 +01:00
Julien Pivotto
bd7ed84a39 Remove obsolete /classic/static route
The /classic/static/* route was added to serve vendor JavaScript and CSS
files (jQuery, Bootstrap, etc.) for console templates. These vendor assets
were removed in #14807 due to security vulnerabilities, making this route
obsolete as it now serves an empty directory.

The console feature remains functional via --web.console.templates and
--web.console.libraries flags. Users who need JavaScript/CSS libraries in
their custom console templates must provide these assets within the
directory specified by --web.console.libraries.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-01-02 17:54:09 +01:00
Julien
46e58a68da
Merge pull request #17713 from roidelapluie/roidelapluie/fix_ui_updates
web/ui: Add checks for Mantine UI PromQL docs and update generated files
2025-12-29 10:50:23 +01:00
Ben Blackmore
31f046f416
feat: add destroy() method to PromQLExtension for memory leak prevention
When React components mount/unmount repeatedly, each creating a new
PromQLExtension, memory leaks occur due to LRU caches with ttlAutopurge
timers keeping references alive and in-flight HTTP requests holding
closure references. This adds destroy() methods throughout the class
hierarchy to properly release resources on unmount.

Changes:
- Add destroy() to PrometheusClient interface (optional)
- HTTPPrometheusClient: track AbortControllers and abort pending requests
- Cache: clear all LRU caches and reset cached data
- CachedPrometheusClient: delegate to cache and underlying client
- HybridComplete: delegate to prometheusClient
- CompleteStrategy: add optional destroy() method
- PromQLExtension: delegate to complete strategy

Signed-off-by: Ben Blackmore <ben.blackmore@dash0.com>
2025-12-29 08:27:56 +01:00
Julien
68e2c8e3d0
Merge branch 'main' into roidelapluie/fix_ui_updates
Signed-off-by: Julien <291750+roidelapluie@users.noreply.github.com>
2025-12-26 16:53:40 +01:00
Bryan Boreham
bf7b83059c
Prepare release candidate 3.9-rc.0 (#17716)
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2025-12-23 11:56:39 +00:00
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
Julien Pivotto
6613c09ad7 web/ui: Regenerate PromQL function files.
Update generated files with latest functions from Prometheus, adding
support for first_over_time, info, ts_of_first_over_time,
ts_of_last_over_time, ts_of_max_over_time, and ts_of_min_over_time.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2025-12-19 12:43:15 +01:00
Julien Pivotto
030cb5e4ee web/ui: Add make targets for PromQL function generation.
Add make targets to generate and check PromQL function signatures and
documentation for the Mantine UI. The generate-promql-functions target
runs the Go generators and automatically lints the output files. The
check-generated-promql-functions target verifies that generated files
are up to date, similar to check-generated-parser.

Fix the gen_functions_list generator to output properly formatted
TypeScript code with correct indentation and semicolons.

Add check-generated-promql-functions to the UI tests CI job to ensure
generated files stay in sync with upstream changes.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2025-12-19 12:43:15 +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