Skip to content

TraceQL: Durations can't be compared to floats #4046

Open
@joe-elliott

Description

@joe-elliott

Unsure if this is a feature request or a bug but it makes the language feel inconsistent so I'm writing it up as a bug. There are a few TraceQL constructions with duration that return an error in the fetch layer.

This works b/c 10 / 3 resolves to an int which is compared to the duration:

{ span:duration > 10 / 3 }

This is functionally the same query but does not work b/c 10ns / 3 resolves to a float and an error bubbles up from the createIntPredicate logic.

{ span:duration > 10ns / 3 }

Similarly these do not work:

{ span:duration > 10  * .3 }
{ span:duration > 10ns  * .3 }

Duration is stored as an int but it makes sense to me that it should be comparable to floats in case someone wants to do math with durations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    keepaliveLabel to exempt Issues / PRs from stale workflowtraceqltype/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions