Telemetry

Query telemetry

Canonical neutral query envelope for traces, metrics, and logs. Select a source, compute list, and time range; optionally group, filter, bucket, sort, limit, and include totals. ReportingService.QueryReport and TraceQueryService.AggregateTraces remain supported compatibility contracts.

post/v3/telemetry/query

Request body

source'TELEMETRY_SOURCE_UNSPECIFIED' | 'TELEMETRY_SOURCE_TRACES' | 'TELEMETRY_SOURCE_METRICS' | 'TELEMETRY_SOURCE_LOGS'
fromstring date-time
tostring date-time
grainstring

Empty string and "none" are equivalent: a single row per group instead of a time series.

group_bystring[]
filter_operatorstring
limitinteger

Scalar queries: maximum returned rows, default 100. Time-series queries: optional maximum number of distinct groups; exceeding it fails the query instead of truncating timelines. Time-series results are complete within safety budgets of 5000 rows, 5000 buckets, and 50000 metric values. Queries are limited to 90 days and 30 seconds of execution.

time_zonestring
include_totalsboolean
mode'timeseries' | 'scalar'

Value shaping. timeseries buckets by grain; scalar returns one row per group. When omitted, grain selects the compatible shape.

sort'desc' | 'asc'

Ordering for scalar/top-list rows. Defaults to desc.

interval_secondsinteger

Explicit bucket width in seconds. Takes precedence over grain when both are set.

selected_range_secondsinteger

The span originally selected, before live extended [from, to). grain:"auto" resolves bucket width from this span, independent of how far [from, to) has since grown.

project_idstring

Pins the read to one project the caller can reach. Omit to keep the caller's token scope.

Response

OK

objectstring
has_moreboolean

Changes

Changed in 2 of the 350 revisions of this API.11

Of the 350 revisions, 136 have no diff computed.