Query metrics
Runs an arbitrary PromQL query against the metric backend at LOG10X_CUSTOMER_METRICS_URL. Returns the raw Prometheus response plus metadata about which backend served the query. Escape hatch when the higher-level Translate and Correlate tools don't cover what you need.
Example
"run
apm_request_duration_p99{service="payments-svc"}now"apm_request_duration_p99{service="payments-svc",pod="payments-7c4f"} 4823.2 apm_request_duration_p99{service="payments-svc",pod="payments-9d1a"} 5102.4 apm_request_duration_p99{service="payments-svc",pod="payments-2b8e"} 4901.7Backend: grafana_cloud, served in 142ms.
More to ask
- "range query last hour, minute granularity, payments-svc p99"
- "verify
kafka_consumer_lagexists in our backend" - "label values for
serviceonapm_request_duration_p99"
Prerequisites
LOG10X_CUSTOMER_METRICS_URL configured (grafana_cloud, amp, datadog_prom, or generic_prom backend type).
Tool schema (advanced)
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
promql |
string | yes | — | PromQL expression to execute. |
mode |
string | no | instant |
instant (point-in-time) or range (window with bucket step). |
start |
string | when mode=range | — | Range start — ISO8601 or UNIX seconds. |
end |
string | when mode=range | — | Range end. |
step |
string | when mode=range | — | Bucket step in seconds. |