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

[trace view] Different color for spans from different instances of the same service

Open sfriberg opened this issue 5 years ago • 5 comments

Requirement - what kind of business use case are you trying to solve?

Easy interpretation of larger applications with multiple internal spans from different components.

Problem

Spans from the same service all have the same color, making it hard to easily and visually separate which component inside the service the span is related to.

Proposal

Extend the existing color generator to also allow different coloring of spans with different values in the component tag.

Perhaps a two color scheme would make sense where the line (edge of the rectangle) would have the service color, and then you would have a component color as the fill.

    /**
     * COMPONENT is a low-cardinality identifier of the module, library, or package that is instrumented.
     */
    public static final StringTag COMPONENT = new StringTag("component");

Any open questions to address

sfriberg avatar Feb 22 '19 20:02 sfriberg

Hi, I want to work on this.

rneha725 avatar Mar 21 '19 11:03 rneha725

@rneha725 Fantastic! Please do. Contributions are definitely welcomed!

We've been thinking it would be great to refine this aspect of the UI.

To that end, I was brainstorming a bit this weekend about how the Span & Operation name column, in the trace timeline, could be made a bit easier to read.

Here is the exploration:

Screen Shot 2019-03-21 at 2 52 45 PM

I'm not sure if this is the right approach, it was just a bit of cleanup I wanted to try out.

Client spans are marked with the arrow to the right. Server spans and process boundaries are emphasized in blue. Sub-spans that are the same process as their closest ancestor have the service name deemphasized.

Also, I don't think the screenshot actually addresses the OP, the screenshot is just somewhat-related.

tiffon avatar Mar 21 '19 18:03 tiffon

hi @tiffon thanks for responding, this task can be broken down. For better clarity to the reader of the spans, service color can be added , yes!. For the changes you are suggesting I am not clear. Please explain a little bit more. .I will be needing more suggestions on this topic.

rneha725 avatar Apr 01 '19 07:04 rneha725

Played a bit with CSS to see what would be possible and so far what seems to be the clearest way to visualize it is using a horizontal gradient.

      <div
        aria-label={label}
        className="SpanBar--bar"
        style={{
          background: `linear-gradient(
            to bottom,
            ${color},
            ${color} 70%,
            ${colorGenerator.getColorByKey(component)} 70%,
            ${colorGenerator.getColorByKey(component)} 100%
          )`,
          left: toPercent(viewStart),
          width: toPercent(viewEnd - viewStart),
        }}
      >

Regular image

Folded image

sfriberg avatar Jun 11 '19 13:06 sfriberg

Any progress on this ?

ignatandrei avatar May 22 '21 15:05 ignatandrei