-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Define DSL for analysis and query span data #1811
Comments
Would it make sense to start by implementing GraphQL (#169)? |
@yurishkuro I am wondering do we want to make the library to work in a distributed way (like spark RDD)? In the previous discussions, we have also mentioned that we could reuse existing graph traversal frameworks e.g. Gremlin. I am not sure if GraphQL #169 provides the same capabilities or it is used only for UI integrations. |
We should also think about use cases this feature would solve:
|
I am not sure how we could use this query language without backed supporting it. To use gremlin we would have provide a gremlin compatible layer to allow query execution. @jaegertracing/data-analytics @yurishkuro any ideas? Maybe running the query on the subset of data directly in-memory would work. |
Would it be easier if we could curate traces from a (relatively) complex system that someone in the community is running in production and would volunteer to publish? It would move focus from data collection to actual analysis and it would also help different teams collate and confirm results while working on the same data-set. Didn't dig very deep but seem relevant - https://github.com/google/cluster-data |
@pavolloffay there are several parts to the DSL/library: 1. a way to define a stream of tracesThis may include: In case of a source providing just spans, there needs to be a pre-aggregation step that assembles them into traces. This creates interesting challenges when done on a live stream as opposed to historical data, since on historical data we can simply group-by, while with a live stream we need to use window aggregation The output of the first step is RDD-like stream of traces. 2. Filtering stepThis is where the first part of the DSL comes in - how to express a query on a trace, when trace is represented as a graph. Joe's proposal didn't really address the graph nature of the trace, only filtering conditions on individual spans (which could also be a valid use case). 3. Evaluation / feature extraction stepThe second part of the DSL - expressing feature extraction computation on the graph, like the Facebook's Canopy example above. Note an interesting thing in that example - it operates on a trace almost like on a flat collection of spans. They probably have expressions that can walk the graph, like I think the minimum DSL we need is just an ability to walk the in-memory representation of the trace as graph (i.e. In other words, what we need is just a data model, and maybe some simple helper functions for finding things, like |
I have started defining DSL with gremlin in https://github.com/pavolloffay/jaeger-tracedsl Here is an example from app class https://github.com/pavolloffay/jaeger-tracedsl/blob/master/src/main/java/io/jaegertracing/dsl/gremlin/App.java TraceTraversalSource traceSource = graph.traversal(TraceTraversalSource.class);
GraphTraversal<Vertex, Vertex> spans = traceSource
.hasTag(Tags.SPAN_KIND.getKey(), Tags.SPAN_KIND_CLIENT)
.duration(P.gt(100));
for (Vertex v : spans.toList()) {
System.out.println(v.label());
System.out.println(v.property(Keys.OPERATION_NAME).value());
System.out.println(v.keys());
} You can see how the filtering and extraction look like. The API allows to use trace DSL but also core gremlin API at the same time. This is a simple example but it should be possible to do things like:
Any suggestions are welcome. My next step would be:
|
@yurishkuro - Is this aggregator component available in open source? |
I have made some progress in my repository. The repository so far contains: Gremlin trace DSL - defined methods for easier filtering and iteration over graph (extraction) The next steps are:
|
It would be great if somebody could help with moving protos to IDL and make configure build process to different languages #1213. |
Created based on #1639 (comment).
Define domain-specific language (DSL) for analysis and query Span data. An example from Facebook's canopy system:
The library should be able to connect to any Span source - jaeger query, json file, storage.
DSL in Canopy https://research.fb.com/publications/canopy-end-to-end-performance-tracing-at-scale/
cc @jaegertracing/data-analytics
The text was updated successfully, but these errors were encountered: