Skip to content
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

[feature] Visualize Critical Path of a trace #1582

Merged
merged 162 commits into from
Sep 4, 2023
Merged

[feature] Visualize Critical Path of a trace #1582

merged 162 commits into from
Sep 4, 2023

Conversation

GLVSKiriti
Copy link
Contributor

@GLVSKiriti GLVSKiriti commented Jul 14, 2023

This PR is to add support(UI) for critical path analysis to Jaeger UI.
Resolves #1288

Respective Algorithm PR is #1532
Related bug fixes through PRs #1780 #1785 #1871
@yurishkuro @yashrsharma44

GLVSKiriti and others added 30 commits June 30, 2023 18:11
We got trace data to implement critical path for a trace and we added TraceCriticalPath option

Signed-off-by: GLVS Kiriti <[email protected]>
This function finds child spans of each span

Signed-off-by: GLVS Kiriti <[email protected]>
Instead we critical path algotihm runs on rendering TracePage and then we can visualize critical path

Signed-off-by: GLVS Kiriti <[email protected]>
Here in criticalPath array  all critical Path sections of each span are added to it

Signed-off-by: GLVS Kiriti <[email protected]>
As it is new file license should be added

Signed-off-by: GLVS Kiriti <[email protected]>
Signed-off-by: GLVS Kiriti <[email protected]>
Signed-off-by: GLVS Kiriti <[email protected]>
Signed-off-by: GLVS Kiriti <[email protected]>
Test passed successfully

Signed-off-by: GLVS Kiriti <[email protected]>
And also structured all required data for tests in test1 test2 js files only

Signed-off-by: GLVS Kiriti <[email protected]>
This function turncates or drops the child spans if they start/end (overflow) before/after parent span

Signed-off-by: GLVS Kiriti <[email protected]>
In this case child span is entirely outside the parent span so it is dropped

Signed-off-by: GLVS Kiriti <[email protected]>
Signed-off-by: GLVS Kiriti <[email protected]>
Now it also drops the child spans of already dropped spans

Signed-off-by: GLVS Kiriti <[email protected]>
Now only everyTime the input changes critical path algorithm is computed

Signed-off-by: GLVS Kiriti <[email protected]>
Signed-off-by: GLVS Kiriti <[email protected]>
@yashrsharma44
Copy link
Contributor

yashrsharma44 commented Aug 19, 2023

I took a look at the PR, and while we are addressing the changes, let's gate this feature(Critical Path Algorithm Component) using a config value - https://github.com/jaegertracing/jaeger-ui/blob/fabd2e756113b8bfdc2103c657ee2915b35fa56d/packages/jaeger-ui/src/constants/default-config.tsx

We can disable this feature to start with, and add the option to enable this, if people want to try this feature. We can merge this PR while keeping this feature gated, and add some follow up items to improve the space complexity of this algorithm. I can suggest more review items, but I think this would make this PR more lengthier than I would like.

As we have comprehensive unit-tests, we can iterate on improving the space complexities of the individual functions without breaking the logical behaviour(one of the perks of having unit-test :))

yurishkuro and others added 2 commits September 4, 2023 08:08
yurishkuro
yurishkuro previously approved these changes Sep 4, 2023
Signed-off-by: GLVS Kiriti <[email protected]>
@yurishkuro yurishkuro merged commit 0c6349e into jaegertracing:main Sep 4, 2023
@bobrik
Copy link
Contributor

bobrik commented Sep 7, 2023

I tried out the jaeger v1.49.0 and it doesn't seem to show what I would expect to see:

image

I would expect to see request to be a part of the critical path here.

@bobrik
Copy link
Contributor

bobrik commented Sep 7, 2023

Manually adjusting duration in a json file doesn't help:

image

@yurishkuro
Copy link
Member

is this a follows-from span kind? in the first s/s it was after the parent span so not on the critical path of THAT span, and CP is defined recursively starting from the root span, at least in the current version.

@yurishkuro
Copy link
Member

btw, glad to see you're trying it out, bug reports are very welcome (maybe start another ticket).

@GLVSKiriti GLVSKiriti deleted the uiBranch branch September 12, 2023 07:44
yurishkuro added a commit that referenced this pull request Oct 22, 2023
## Which problem is this PR solving?
- Related to #1582 

## Description of the changes
-  Added Tooltip which is visible on hovering the critical path

@yurishkuro

---------

Signed-off-by: GLVS Kiriti <[email protected]>
Signed-off-by: GLVSKiriti <[email protected]>
Co-authored-by: Yuri Shkuro <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Visualize Critical Path of a trace
7 participants