jaeger-ui
jaeger-ui copied to clipboard
How to find the error span in the trace/xxx page?
Requirement - what kind of business use case are you trying to solve?
when a trace has many spans(10000), how can i find the the few spans with error tag quickly in jaeger-ui? I try to use the mouse to scroll all the time, it is ineffective.
Problem - what in Jaeger blocks you from solving the requirement?
same as Requirement
Proposal - what do you suggest to solve the problem or improve the existing situation?
I tried to use my unskilled js to solve it.
// TracePageHeader.js
var rollIndex = 0;
function RollNext() {
var list = document.getElementsByClassName('span-name-wrapper')
if (rollIndex>=list.length){
rollIndex = 0
}
for(let i = rollIndex; i <= list.length -1 ; i ++) {
// every error span has "svg" tag
if(list[i].getElementsByTagName('svg').length !== 0 && i>rollIndex) {
rollIndex = i;
break;
}
}
list[rollIndex].scrollIntoView(false);
}
<button id="roll1" onClick={RollNext}>next</button>
This code didn't use react, just resolve my problem. I expect more graceful solution. Thanks~
Any open questions to address
The errors are marked with red exclamation point. If span X has that error, and span Y is a parent of X, and you collapse Y, then the exclamation sign bubbles up to Y, and so on. So strictly speaking if you collapse everything to the root span, it will show with error, then expand it, and the error will move to the next level parent.
Not saying we don't need a better way, but not all is lost :-)
so, if we can add a button like this, maybe it is a better way?
Have you tried searching for the word error? The search looks at tags and allows quick jumps between matched spans
@yurishkuro
Yeah, the search of browser works well in some ways.
But the word error only show when i expand the span. When a trace has many many spans, i cant expand all spans.
The error span I am talking about is a span with an error tag, like this:
I was not talking about browser search, but Jaeger's built-in search on the trace view, next to the button you were proposing
@yurishkuro I am very sorry, I have forgotten to reply to you due to the three-day Mid-Autumn Festival. I tried jaeger's search, which does not meet my scene needs. When I type error, it doesn't highlight the error span, and I didn't find the jump function you said.
@yurishkuro The upgrade to the search hasn't landed yet. I'm going to take a look at the PRs today to see what, if anything, is needed to land them.
@LvBay You're right, the functionality @yurishkuro described is implemented but not yet merged. Apologies for the mixup.
I think what you're referring to might also be addressed by #159 - Trace - Navigation by markers. The idea being there would be error icons in the mini-map which you can click on to scroll to the span.
@tiffon Looking forward to the new version after the merger!
@tiffon I have seen the new version of search, which is basically close to my ideal feature. But when I type error, it can't find error span and jump. It seems to just search in service & operation, can we expand the search for span with error tag?
@LvBay The find PR which was merged does not affect the underlying matching, it's an update to the UX and presentation layer. There are two other pending PRs which will enhance the matching capabilities.
Apologies for the mixup and, thanks for your feedback!
The search functionality seems to be limited in general, this would be a good thing to fix along with other search usage. Adding the tag on this issue even though its really old.