Skip to content

Prom ql builder#52

Merged
nitisht merged 6 commits into
mainfrom
PromQL-builder
May 13, 2026
Merged

Prom ql builder#52
nitisht merged 6 commits into
mainfrom
PromQL-builder

Conversation

@praveen5959
Copy link
Copy Markdown
Contributor

No description provided.

praveen5959 and others added 6 commits April 17, 2026 11:27
  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).
Resolved conflicts in QueryEditor.tsx, datasource.ts, StreamInfoPanel.tsx,
docker-compose.yaml, and types.ts. Alerting branch superset of origin/main:
keeps PromQL Code mode + completions/hover/parser/history utilities from
PR #51, plus alerting additions (Monitor mode, PromBuilder, StreamInfoPanel
sidebar, autoRunQuery wrapper, label/values time-range + limit scoping,
SQL autocomplete, byte/event sanitizers, ptrace caps for dev compose).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@nitisht nitisht merged commit 5f82e18 into main May 13, 2026
2 checks passed
@nitisht nitisht deleted the PromQL-builder branch May 13, 2026 17:13
@github-actions github-actions Bot locked and limited conversation to collaborators May 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants