From a16490be35ef2eff2d28d42c86192bc97c214044 Mon Sep 17 00:00:00 2001 From: Yusheng Guo Date: Wed, 20 Aug 2025 13:53:12 +0000 Subject: [PATCH] feat(api): add FormatQuery method to Prometheus v1 API Signed-off-by: Yusheng Guo --- api/prometheus/v1/api.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/prometheus/v1/api.go b/api/prometheus/v1/api.go index 50102f624..7bcd4c684 100644 --- a/api/prometheus/v1/api.go +++ b/api/prometheus/v1/api.go @@ -506,6 +506,8 @@ type API interface { TSDB(ctx context.Context, opts ...Option) (TSDBResult, error) // WalReplay returns the current replay status of the wal. WalReplay(ctx context.Context) (WalReplayStatus, error) + // FormatQuery formats a PromQL expression in a prettified way. + FormatQuery(ctx context.Context, query string) (string, error) } // AlertsResult contains the result from querying the alerts endpoint.