jaegertracing / jaeger-ui

Web UI for Jaeger
http://jaegertracing.io/
Apache License 2.0
1.12k stars 477 forks source link

Include references in Span Details #358

Closed yurishkuro closed 3 years ago

yurishkuro commented 5 years ago

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

When tracing through Kafka, follows-from reference type is often used.

Problem - what in Jaeger blocks you from solving the requirement?

Jaeger UI currently does not distinguish child-of and follows-from references in any way.

Proposal - what do you suggest to solve the problem or improve the existing situation?

At minimum, add a section to Span Details listing the references and their types. It will also help dealing with multi-parent spans or references to other traces.

danielgatis commented 4 years ago

Hello, Any news on this topic?

I want to help implement this feature, but I need more information. @yurishkuro can you tell what you have in mind about it?

yurishkuro commented 4 years ago

@rubenvp8510 didn't you already implement the accordion view for references?

rubenvp8510 commented 4 years ago

Hi

Yes I've already implement it in this PR: https://github.com/jaegertracing/jaeger-ui/pull/477

yurishkuro commented 4 years ago

Thanks. Resolving this.

danielgatis commented 4 years ago

@yurishkuro @rubenvp8510

I'm running this example:

https://github.com/salemove/jaeger-client-ruby/blob/master/script/create_follows_from_trace

But I can't see any reference in the details of the span. what am I doing wrong?

Print Screen:

Screen Shot 2020-03-05 at 13 16 53

the generate JSON:

{
  "data": [
    {
      "traceID": "37755ec1ae429b50",
      "spans": [
        {
          "traceID": "37755ec1ae429b50",
          "spanID": "37755ec1ae429b50",
          "flags": 1,
          "operationName": "receive request",
          "references": [

          ],
          "startTime": 1583424781753286,
          "duration": 1210702,
          "tags": [
            {
              "key": "span.kind",
              "type": "string",
              "value": "server"
            },
            {
              "key": "sampler.type",
              "type": "string",
              "value": "const"
            },
            {
              "key": "sampler.param",
              "type": "int64",
              "value": 1
            },
            {
              "key": "internal.span.format",
              "type": "string",
              "value": "proto"
            }
          ],
          "logs": [
            {
              "timestamp": 1583424781857321,
              "fields": [
                {
                  "key": "event",
                  "type": "string",
                  "value": "woop di doop"
                },
                {
                  "key": "count",
                  "type": "int64",
                  "value": 5
                }
              ]
            }
          ],
          "processID": "p1",
          "warnings": null
        },
        {
          "traceID": "37755ec1ae429b50",
          "spanID": "1f16fa4a5c46739d",
          "flags": 1,
          "operationName": "request async action",
          "references": [
            {
              "refType": "CHILD_OF",
              "traceID": "37755ec1ae429b50",
              "spanID": "37755ec1ae429b50"
            }
          ],
          "startTime": 1583424782861634,
          "duration": 102179,
          "tags": [
            {
              "key": "span.kind",
              "type": "string",
              "value": "producer"
            },
            {
              "key": "internal.span.format",
              "type": "string",
              "value": "proto"
            }
          ],
          "logs": [

          ],
          "processID": "p1",
          "warnings": null
        },
        {
          "traceID": "37755ec1ae429b50",
          "spanID": "94371e6e0957cc4f",
          "flags": 1,
          "operationName": "async span started after rpc span",
          "references": [
            {
              "refType": "FOLLOWS_FROM",
              "traceID": "37755ec1ae429b50",
              "spanID": "1f16fa4a5c46739d"
            }
          ],
          "startTime": 1583424783469179,
          "duration": 301801,
          "tags": [
            {
              "key": "span.kind",
              "type": "string",
              "value": "consumer"
            },
            {
              "key": "peer.service",
              "type": "string",
              "value": "downstream-service"
            },
            {
              "key": "internal.span.format",
              "type": "string",
              "value": "proto"
            }
          ],
          "logs": [

          ],
          "processID": "p2",
          "warnings": null
        }
      ],
      "processes": {
        "p1": {
          "serviceName": "test-service",
          "tags": [
            {
              "key": "hostname",
              "type": "string",
              "value": "Daniels-MacBook-Pro-2.local"
            },
            {
              "key": "ip",
              "type": "string",
              "value": "192.168.15.29"
            },
            {
              "key": "jaeger.version",
              "type": "string",
              "value": "Ruby-1.0.0"
            }
          ]
        },
        "p2": {
          "serviceName": "downstream-service",
          "tags": [
            {
              "key": "hostname",
              "type": "string",
              "value": "Daniels-MacBook-Pro-2.local"
            },
            {
              "key": "ip",
              "type": "string",
              "value": "192.168.15.29"
            },
            {
              "key": "jaeger.version",
              "type": "string",
              "value": "Ruby-1.0.0"
            }
          ]
        }
      },
      "warnings": null
    }
  ],
  "total": 0,
  "limit": 0,
  "offset": 0,
  "errors": null
}
rubenvp8510 commented 4 years ago

Hi

The references accordion is only displayed when you have more than one reference. In this example the only reference the spans have is their "parent" span. May be we should change this behaviour to avoid confusion. @yurishkuro

danielgatis commented 4 years ago

@rubenvp8510

In the example above I expected that the async spam is shown in another trace with the reference to the parent.

rubenvp8510 commented 4 years ago

Sorry I only saw the JSON, in the json there are only references in the same trace.

danielgatis commented 4 years ago

Sorry I only saw the JSON, in the json there are only references in the same trace.

@rubenvp8510 you are right, but what should I do to async span time does not impact total time? What do you suggest?

SoniCoder commented 3 years ago

I'm also facing the same issue. Can we please have the referenced "FOLLOWS FROM" span always show the link in accordion and same behavior of the link where it is referenced to as well. I'm using the concept of "links" in open telemetry where the collector automatically transforms them to FOLLOWS FROM references and this fix will be amazing for my use case.