Skip to content

[TraceQL] Add topk/bottomk to TraceQL Metrics #4217

@joe-elliott

Description

@joe-elliott

TraceQL metrics brings the promise of querying infinite cardinality, but in a practical sense both Tempo and Grafana suffer once we start returning series in the 10s of thousands. It can also be quite difficult to parse this amount of information looking at a time series graph.

Add topk/bottomk style functionality to the language to give users control over cardinality and return the series they are most interested in. Syntax would look something like:

{} | rate() by (span.client_ip) | topk(10)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions