Logical operators :: Kloudfuse Docs

Logical operators

Logical operators combine conditions within a spanset filter. All conditions apply to the same span; matching across different spans of a trace (structural operators) is not supported on Kloudfuse.

And (&&)

Combines conditions so that a span matches only when every condition holds. This is the workhorse for narrowing a search: service plus operation, service plus latency, and so on.

Syntax

{ <condition> && <condition> }

Parameters

Parameter Required Description
<condition> Required Any attribute or intrinsic comparison.

Example

Find the Python demo service’s outbound client spans.

{.service_name = "demo-python-service" && kind = client}
Root service Root span Duration
demo-python-service database 50 ms
demo-python-service database 50 ms
demo-python-service database 50 ms

Expected output

Both conditions are evaluated against the same span. Cross-span (structural) matching is not supported: TraceQL.

Or (||)

Combines conditions so that a span matches when any condition holds. Parenthesize when mixing && and || to make precedence explicit.

Syntax

{ <condition> || <condition> }

Parameters

Example

Find spans for either of the demo operations.

{name = "database" || name = "user"}
Root service Root span Duration
demo-java-service database 50 ms
demo-go-service database 50 ms
demo-python-service database 51 ms