334 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Jan Fajerski
a2ba619612 ui: make update-npm-deps
Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
2025-11-06 20:06:56 +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
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
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
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
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
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
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
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
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