-
Notifications
You must be signed in to change notification settings - Fork 504
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
Fix search results DDG path ordering #504
Fix search results DDG path ordering #504
Conversation
Signed-off-by: Everett Ross <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #504 +/- ##
==========================================
+ Coverage 92.92% 92.97% +0.04%
==========================================
Files 197 197
Lines 4808 4808
Branches 1160 1160
==========================================
+ Hits 4468 4470 +2
+ Misses 299 297 -2
Partials 41 41
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Big nit for test logic: it would be a LOT easier to read if the test used letters to denote spans, rather than spelled out names, e.g.
makeTrace([A, B, C])
results inpath(A, B, C)
. - I am generally not a fan of service graph logic depending on span.kind tags. An edge between two services can be established purely from the transition between two services, regardless of the span annotations. So I am not clear as to the intention of the added test. May want to check the logic in the memory storage (although this one is for p2p graphs, but the detection is similar: https://github.com/jaegertracing/jaeger/blob/8b1ebe6be8583b86968e28fd9727c53f02fcd62b/plugin/storage/memory/memory.go#L61).
- Could we introduce some simple JSON-based DSL for describing the traces, to make the data much more readable and the tests data driven? Such as:
{
"test 1": {
"traces": [
[
{ "service": "X", "name": "A" },
{ "service": "Y", "name": "B", "parent": "A" },
{ "service": "Z", "name": "C", "parent": "A" },
],
],
"expectedPaths": [
[
{ "service": "X", "name": "A" },
{ "service": "Y", "name": "B" },
],
[
{ "service": "X", "name": "A" },
{ "service": "Z", "name": "C" },
],
],
}
Note that trace IDs are largely irrelevant, so can represent them just as arrays of spans, and span names can double as IDs in the DSL.
IME with tree-structured data, names that include relationships help with debugging. Granted the test trees here are small so they're not that hard to follow.
I thought that @vprithvi said we changed the definition of an edge from "change in serviceName" to "
I agree that the |
Signed-off-by: Everett Ross <[email protected]>
packages/jaeger-ui/src/model/ddg/transformTracesToPaths.test.js
Outdated
Show resolved
Hide resolved
@@ -45,109 +61,111 @@ describe('transform traces to ddg paths', () => { | |||
traceID, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit confused by how service names are assigned in L55. Looks like a string "{first word of span id} service"
, but the first word of span is, per L47, is span name. So it seems every span in these tests will have a different service name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes every span gets a unique service and operation name. currently service name is not used as part of the trace to path calculation. once we settle on a specification for the flink job we will apply the same rule here and likely need to tweak the test.
Signed-off-by: Everett Ross <[email protected]>
* Reverse and filter trace paths Signed-off-by: Everett Ross <[email protected]> * Hardens tests to ensure path contents Signed-off-by: Everett Ross <[email protected]> * Improve test variable names Signed-off-by: Everett Ross <[email protected]> Signed-off-by: vvvprabhakar <[email protected]>
Signed-off-by: Everett Ross [email protected]
Which problem is this PR solving?
Short description of the changes