feat: PromQL-first with full Code-mode feature parity#51
Open
praveen5959 wants to merge 4 commits intomainfrom
Open
feat: PromQL-first with full Code-mode feature parity#51praveen5959 wants to merge 4 commits intomainfrom
praveen5959 wants to merge 4 commits intomainfrom
Conversation
Add end-to-end PromQL support across Explore, Dashboards and Unified
Alerting, mirroring Grafana's native Prometheus plugin in Code mode.
- Go backend (pkg/plugin): new /prometheus/api/v1/query{,_range} path
used by Unified Alerting, with matrix/vector/scalar decoding,
RFC3339+unix timestamp support, and a URL builder that preserves
RawQuery (fixes 404s caused by JoinPath escaping `?`).
- Frontend datasource: PromQL range/instant dispatch, metadata helpers
(labels, label values, series, metadata, metric names), and typed
variable queries (label_names, label_values, metrics, query_result).
- QueryEditor: Monaco-based PromQL editor with tokenizer, context-aware
completion (metrics + scoped labels/values via /series and /labels
match[]), signature help, hover docs, Lezer-backed error squiggles,
per-datasource query history. UTF-8 metric names (`process.cpu.time`)
are treated as one word for filtering.
- Alerting: metrics datasets always evaluate as PromQL; non-metrics
streams keep SQL with a default backfill so /eval never fires empty.
- Run queries button surfaces in Dashboard and Alerting; Explore keeps
Grafana's top-bar Run. Blur commits text without auto-running.
- Dataset terminology: listStreams → listDatasets (via /api/prism/v1/home),
filtered to metrics-type datasets in PromQL mode.
- Local-dev: add alertmanager service to docker-compose for alert
delivery testing (not included in the release bundle).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.