Open caibirdme opened 3 months ago
@caibirdme Thank you for the great report. It is currently impossible.
Our trace endpoint only support a single clause.
(so {foo.bar="1" && duration > 20ms}
is supported for instance)
Let's keep this issue open and see if we can come up with ways to fix this.
Got. Actually I can split this big query into many small queries, and join them in memory, but this can easily lead to OOM for the ltbridge server.
Like {service="redis"} && {duration > 500ms}
, if I query for all spans which is a redis call, it may return thousands of millions rows. And query for span whose duration is larger than 500ms, also many many rows. And then OOM...
Yes that's pretty terrible. The query in itself is difficult not simple with our data model, but doing it on quickwit side should be much lighter. It will require work however.
I'm implementing tempo's traceql in ltbridge, and I've meet a problem.
Here's a traceql example:
Each curly brackets pair means searching for spans which must satisfy all the conditions inside the curly brackets. Just like
select * from spans_table where foo.bar="1" and duration>20ms
.Logical Operator such as
&& ||
between curly brackets (eg:{A} && {B}
), meansInner Join
spans from A and B on the same trace_id. In human language, this search can be something like:The result should be the form of:
Here's a conversion from traceql to sql traceql:
sql:
I don't know the equivalent quickwit or elasticsearch query, and need your help