Skip to content

feat(api/prometheus): add format_query endpoint for query formatting #1846

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yshngg
Copy link
Contributor

@yshngg yshngg commented Jul 30, 2025

The changes introduce a new /format_query API endpoint to handle query formatting in the Prometheus API.

This includes implementing the FormatQuery function in api.go and adding corresponding test cases in api_test.go to ensure proper functionality.

Fix #1845

The changes introduce a new `/format_query` API endpoint to handle query formatting in the Prometheus API. This includes implementing the `FormatQuery` function in `api.go` and adding corresponding test cases in `api_test.go` to ensure proper functionality.

Signed-off-by: yshngg <[email protected]>
@yshngg yshngg force-pushed the feature/format-query branch from 4c76b54 to 1be9221 Compare July 30, 2025 09:09
Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing, thanks!

return "", err
}

// var qres queryResult
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left over?

Suggested change
// var qres queryResult

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proposal to Add FormatQuery Method for API
2 participants