Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Preserve Jaeger RefType when storing/retrieving traces. #1681

Merged
merged 1 commit into from
Oct 14, 2022

Commits on Oct 14, 2022

  1. Preserve Jaeger RefType when storing/retrieving traces.

    Jaeger, like OpenTracing, uses identifies the type of references between
    Spans. There are only two types of references `CHILD_OF` and
    `FOLLOWS_FROM`.
    
    OTEL doesn't have an analogous to Jaeger reference type in their link
    specification. An OTEL span can have only one parent, and that's set as
    an attributed of the span instead of an OTEL link.
    
    When using the Jaeger to OTEL translator the first reference with type
    `CHILD_OF` is used to set the OTEL span parent attribute, all other
    references are converted to links, and since there is no notion of
    reference type that information is lost. On the reverse transformation,
    OTEL to Jaeger, the OTEL Span parent is converted to a reference with
    `CHILD_OF` type, while all the other OTEL links are converted to
    `FOLLOWS_FROM` references.
    
    The problem is that Jaeger, unlike OTEL, supports the notion of multiple
    parents (one use case is fork/join workloads), running this multi-parent
    through the translator and back returns a span with a single parent with
    all the other parents turned into `FOLLOWS_FROM` references.
    
    There's an open PR in the translator to keep this information by adding
    the type as attribute to the links following the semantic convention for
    OpenTracing compatibility:
    
    https://opentelemetry.io/docs/reference/specification/trace/semantic_conventions/compatibility/#OpenTracing
    open-telemetry/opentelemetry-collector-contrib#14463
    
    While that gets merge we are going to be manually setting the reference
    type as an attribute on the links when writing traces. On the retrieving
    traces side, we'll be using those attributes to set the corresponding
    reference type when constructing the Jaeger traces responses.
    alejandrodnm committed Oct 14, 2022
    Configuration menu
    Copy the full SHA
    beea06b View commit details
    Browse the repository at this point in the history