jaeger-ui icon indicating copy to clipboard operation
jaeger-ui copied to clipboard

How to find the error span in the trace/xxx page?

Open LvBay opened this issue 5 years ago • 11 comments

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

LvBay avatar Sep 21 '18 03:09 LvBay

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 :-)

yurishkuro avatar Sep 21 '18 03:09 yurishkuro

so, if we can add a button like this, maybe it is a better way?

image

LvBay avatar Sep 21 '18 04:09 LvBay

Have you tried searching for the word error? The search looks at tags and allows quick jumps between matched spans

yurishkuro avatar Sep 21 '18 04:09 yurishkuro

@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:

image

LvBay avatar Sep 21 '18 06:09 LvBay

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 avatar Sep 21 '18 21:09 yurishkuro

@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.

LvBay avatar Sep 25 '18 02:09 LvBay

@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 avatar Sep 25 '18 13:09 tiffon

@tiffon Looking forward to the new version after the merger!

LvBay avatar Sep 25 '18 14:09 LvBay

@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 avatar Sep 26 '18 09:09 LvBay

@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!

tiffon avatar Sep 26 '18 20:09 tiffon

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.

jkowall avatar Oct 14 '21 16:10 jkowall