Google Cloud Monitor: Prom query editor (#73503)

* revert

* works but needs clean up and tests

* clean up

* remove any

* change confusing query var to expr

* oops

* add test

* lint

* cleanup

* update docs

* Update public/app/plugins/datasource/cloud-monitoring/components/PromQLEditor.tsx

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>

* nit

* lint fix?

* remove comment from cue

* go linter

* removing parsing stuff parseresponse func

---------

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
This commit is contained in:
Andrew Hackmann
2023-08-18 11:14:43 -05:00
committed by GitHub
parent 23ae1127a7
commit 42f4306251
23 changed files with 512 additions and 17 deletions
@@ -218,8 +218,6 @@ To understand basic MQL concepts, refer to [Introduction to Monitoring Query Lan
**To create an MQL query:**
1. Select the **Metrics** option in the **Query Type** dropdown.
1. Select **<> Edit MQL** next to the **Query Type** field.
This toggles the MQL query builder mode.
1. Select a project from the **Project** dropdown.
1. Enter your MQL query in the text area.
@@ -274,6 +272,15 @@ The **Alias By** field helps you control the format of legend keys for SLO queri
SLO queries use the same alignment period functionality as [metric queries](#define-the-alignment-period).
### Create a Prometheus query
**To create an Prometheus query:**
1. Select the **PromQL** option in the **Query Type** dropdown.
1. Select a project from the **Project** dropdown.
1. Enter your Prometheus query in the text area.
1. Enter a Min Step interval. The **Min step** setting defines the lower bounds on the interval between data points. For example, set this to `1h` to hint that measurements are taken hourly. This setting supports the `$__interval` and `$__rate_interval` macros.
## Apply annotations
{{< figure src="/static/img/docs/google-cloud-monitoring/annotations-8-0.png" max-width= "400px" class="docs-image--right" >}}