TraceQL

Overview

TraceQL is the Grafana query language that selects traces based on:

  • Span and resource attributes, timing, and duration

  • Basic aggregates: count(), avg(), min(), max(), and sum()

  • Pipeline operations: select() and by()

Kloudfuse supports querying spans using TraceQL only from its embedded Grafana configuration. The corresponding datasource is KfuseTraceDatasource. Trace Analytics do not rely on TraceQL, and both generated and saved dashboards and alerts do not use TraceQL.

The categories below document every supported operator with syntax, parameters, and a validated example. For programmatic access, see the Traces API Reference.

Unsupported TraceQL features

Kloudfuse implements a subset of Grafana Tempo’s TraceQL. The following Tempo features are not supported:

  • Structural operators — descendant (>>), child (>), sibling (~), and their negated and union variants. All conditions in a Kloudfuse TraceQL query apply to the same span.

  • TraceQL metrics functionsrate, *_over_time, histogram_over_time, and quantile_over_time over spans.

  • Trace-scoped intrinsic spellingstrace:rootService, trace:rootName, trace:duration, and the classic rootServiceName / rootName forms. Use traceDuration for whole-trace latency, and filter services through the .service_name attribute.