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

FOLLOWS_FROM breaks nesting #3785

Closed
bobrik opened this issue Jun 28, 2022 · 5 comments · Fixed by #3786
Closed

FOLLOWS_FROM breaks nesting #3785

bobrik opened this issue Jun 28, 2022 · 5 comments · Fixed by #3786
Labels

Comments

@bobrik
Copy link
Contributor

bobrik commented Jun 28, 2022

Describe the bug

Here's a correctly nested span of foo:

image

And here it is if it had a FOLLOWS_FROM relation to another trace:

image

Here resize comes first and you can't collapse fetch_original anymore.

To Reproduce

Use the following trace:

Trace JSON
{
  "data": [
    {
      "traceID": "000b96aa5af85802",
      "spans": [
        {
          "traceID": "000b96aa5af85802",
          "spanID": "a614e96eb1497a81",
          "flags": 1,
          "operationName": "outer_fetch",
          "references": [
            {
              "refType": "CHILD_OF",
              "traceID": "000b96aa5af85802",
              "spanID": "cb014a7699e5508e"
            }
          ],
          "startTime": 1656373451396750,
          "duration": 817251,
          "tags": [],
          "logs": [],
          "processID": "p4",
          "warnings": null
        },
        {
          "traceID": "000b96aa5af85802",
          "spanID": "003b513841595ca8",
          "flags": 1,
          "operationName": "upstream",
          "references": [
            {
              "refType": "CHILD_OF",
              "traceID": "000b96aa5af85802",
              "spanID": "4901aedc23df1dce"
            }
          ],
          "startTime": 1656373451396459,
          "duration": 817640,
          "tags": [],
          "logs": [],
          "processID": "p4",
          "warnings": null
        },
        {
          "traceID": "000b96aa5af85802",
          "spanID": "cb014a7699e5508e",
          "flags": 1,
          "operationName": "fetch_original",
          "references": [
            {
              "refType": "CHILD_OF",
              "traceID": "000b96aa5af85802",
              "spanID": "003b513841595ca8"
            }
          ],
          "startTime": 1656373451396650,
          "duration": 861682,
          "tags": [],
          "logs": [],
          "processID": "p4",
          "warnings": null
        },
        {
          "traceID": "000b96aa5af85802",
          "spanID": "5d9c73de4bc72907",
          "flags": 1,
          "operationName": "request",
          "references": [
            {
              "refType": "CHILD_OF",
              "traceID": "000b96aa5af85802",
              "spanID": "000b96aa5af85802"
            }
          ],
          "startTime": 1656373451395536,
          "duration": 981525,
          "tags": [],
          "logs": [],
          "processID": "p4",
          "warnings": [
            "invalid parent span IDs=000b96aa5af85802; skipping clock skew adjustment"
          ]
        },
        {
          "traceID": "000b96aa5af85802",
          "spanID": "0987bec35d5a56b6",
          "flags": 1,
          "operationName": "resize",
          "references": [
            {
              "refType": "CHILD_OF",
              "traceID": "000b96aa5af85802",
              "spanID": "4901aedc23df1dce"
            }
          ],
          "startTime": 1656373452216334,
          "duration": 160599,
          "tags": [],
          "logs": [],
          "processID": "p4",
          "warnings": null
        },
        {
          "traceID": "000b96aa5af85802",
          "spanID": "4901aedc23df1dce",
          "flags": 1,
          "operationName": "req",
          "references": [
            {
              "refType": "CHILD_OF",
              "traceID": "000b96aa5af85802",
              "spanID": "5d9c73de4bc72907"
            }
          ],
          "startTime": 1656373451396445,
          "duration": 980549,
          "tags": [],
          "logs": [],
          "processID": "p4",
          "warnings": null
        },
        {
          "traceID": "000b96aa5af85802",
          "spanID": "f73171faa83d736f",
          "flags": 1,
          "operationName": "request",
          "references": [
            {
              "refType": "FOLLOWS_FROM",
              "traceID": "f7b9d2469d256315",
              "spanID": "f7b9d2469d256315"
            },
            {
              "refType": "CHILD_OF",
              "traceID": "000b96aa5af85802",
              "spanID": "a614e96eb1497a81"
            }
          ],
          "startTime": 1656373451413428,
          "duration": 800612,
          "tags": [],
          "logs": [],
          "processID": "p16",
          "warnings": [
            "clock skew adjustment disabled; not applying calculated delta of -8.3585ms"
          ]
        }
      ],
      "processes": {
        "p16": {
          "serviceName": "foo",
          "tags": []
        },
        "p4": {
          "serviceName": "irp",
          "tags": []
        }
      },
      "warnings": null
    }
  ],
  "total": 0,
  "limit": 0,
  "offset": 0,
  "errors": null
}

The problematic reference is:

            {
              "refType": "FOLLOWS_FROM",
              "traceID": "f7b9d2469d256315",
              "spanID": "f7b9d2469d256315"
            }

Expected behavior

FOLLOWS_FROM adds an icon and doesn't change nesting or ordering.

Version (please complete the following information):

  • Jaeger version: v1.16.0
@bobrik bobrik added the bug label Jun 28, 2022
@yurishkuro
Copy link
Member

Q1: if you reorder the span references in this span such that CHILD_OF comes in first, would the UI display it correctly then?

Q2: was this trace JSON originally loaded from the Jaeger backend, or composed by some other means?

I seem to recall we had logic in the backend to reorder the references such that we have the true "parent" reference comes first in the list, which is what might be tripping the UI.

@bobrik
Copy link
Contributor Author

bobrik commented Jun 28, 2022

A1: Indeed it works correctly if CHILD_OF is first.

A2: It came from Jaeger backend.

@bobrik
Copy link
Contributor Author

bobrik commented Jun 28, 2022

I'm not seeing anything that would place CHILD_OF reference first, but it seems easy enough to add with an adjuster.

I'm happy to open a PR if you agree with this approach.

@yurishkuro
Copy link
Member

yes, I would do it in the query path of the backend (as an adjuster)

@yurishkuro yurishkuro transferred this issue from jaegertracing/jaeger-ui Jun 28, 2022
@bobrik
Copy link
Contributor Author

bobrik commented Jun 28, 2022

I opened #3786

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants