describe_schema
Discover the queryable fields, functions, and measures for a data source. Use this before run_sql to learn what's available.
Sources: logs, spans, metrics. Default: logs.
Call with NO arguments to start — you get the list of services (with volumes) plus the field profile for logs. Then optionally pass service= to drill into one service's fields (different services emit different dynamic attributes).
Per field: type, coverage, distinct-value estimate, top values (low-cardinality), and a GROUP BY verdict (safe / with care / filter only). Dynamic attributes are the ACTUAL keys in your data — use them directly in QuerySQL (e.g. SELECT http_method FROM logs). Resource-level attributes (logs and spans only) use a resource. prefix, e.g. resource.service.name.
Always returns the source's measures (fn, label, unit, defaultMode — the mode a new alert rule on this measure should default to) and the available QuerySQL functions with their argument counts.
For source=metrics, the metric list is volume-ranked and bounded to a default page; metricsMatched reports the true total independent of what was returned. Pass prefix= to reach past that default page into the tail, e.g. prefix="http." for HTTP metrics.
Optional filter= restricts discovery to matching rows. The predicate is QuerySQL and uses the same field names as run_sql (e.g. level = 'ERROR', http_method = 'GET'); subqueries are not allowed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Optional: focus on a single field. | |
| filter | No | Optional: QuerySQL predicate restricting discovery, e.g. "level = 'ERROR'". Same field names as run_sql; no subqueries. | |
| prefix | No | Optional, source=metrics only: only include metric names starting with this prefix — reaches past the default-bounded list. | |
| source | No | Data source: logs, spans, or metrics. Default: logs. | |
| service | No | Optional: scope to one service. |