From fc4707333523b79a8030ecdbc50a0bbcf611e7e7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 25 Oct 2024 03:43:03 +0000 Subject: [PATCH] [release-v2.6] Add sum() example to TraceQL docs (#4235) (cherry picked from commit cd3ccef51c59ab082c95b9a95280ad87d85f9ca3) Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com> --- docs/sources/tempo/traceql/_index.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/sources/tempo/traceql/_index.md b/docs/sources/tempo/traceql/_index.md index 47bc28b5c19..a904f3ece38 100644 --- a/docs/sources/tempo/traceql/_index.md +++ b/docs/sources/tempo/traceql/_index.md @@ -416,6 +416,12 @@ For example, find traces that have more than 3 spans with an attribute `http.sta { span.http.status_code = 200 } | count() > 3 ``` +To find spans where the total of a made-up attribute `bytesProcessed` was more than 1 GB: + +``` +{ } | sum(span.bytesProcessed) > 1000000000 +``` + ## Grouping TraceQL supports a grouping pipeline operator that can be used to group by arbitrary attributes. This can be useful to