[PoC] Add support for span link traversal in TraceQL - #6113
Conversation
e0876ad to
fc917b1
Compare
|
Hi, first of all I want to say that I think this is a clever approach to providing this functionality. I hadn't thought about doing it this way, and the new operator syntax is good, close to the existing operators but different and still memorable. However I need some help understanding a few parts.
|
@mdisibio it may be a terrible idea/implementation 🤣, but i am mostly just mimicking how i was manually querying. i had tried originally adding it to the querier, but it wasn't clear if that would work since each piece is kind of a separate query that might need to be sharded.
before i respond to 1 & 2, i had wondered something similar. does this make more sense to do in the grafana datasource and panel plugin for traces, or do you think this makes sense to also include in tempo? to me, it seems like better UX (at least for my use case) if the panel also combines the results into a structure similar to a parent/child relationship |
Was thinking more about an easy way to vet the approach on different workloads and scales, and then we could figure out the best location for it. I do agree that server-side in Tempo seems the most likely. |
|
This PR has been automatically marked as stale because it has not had any activity in the past 60 days. |
What this PR does:
this is a PoC of adding cross-trace link traversal to TraceQL. it allows querying spans across different traces that are connected by span links.
changes:
->>(link-to): finds spans linked TO from the current spanset.<<-(link-from): finds spans that link FROM the current spanset.&->>and&<<-: union that return both the original spans and the discovered linked spans.search_sharderin the frontend has been updated to handle link traversal in multiple phases with some basic limits. it's unclear how to properly enforce query limits with the union operator.How to test:
make link-devto build and run tempo and grafana in dockeropen http://localhost:3000/explore and run example queries below. grafana does not yet support this syntax, but the queries will still execute.