-
Notifications
You must be signed in to change notification settings - Fork 168
Preserve Jaeger RefType when storing/retrieving traces. #1681
Conversation
961311f
to
5c4ea2f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks super clean :)
@@ -14,16 +14,12 @@ import ( | |||
"fmt" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIUC, all jaeger related tests which we own can be removed once we get jaeger storage integration tests up & running right? I feel most of the tests which we own are redundant. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeh, I think we need to review all the tests we have, specially for traces. There are some that I modified in the previous PR that counted the results, I changed them to check the values, then found out that there's another suite that runs basically the same tests and compares to some fixtures that are snappy compressed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other point is that some of the tests we have also test the OTEL ingest pipeline. The thing is that the responses to compare against the fixtures are retrieved using the Jaeger endpoint.
418c80c
to
c63737c
Compare
5c652ac
to
c47f053
Compare
c63737c
to
db84c70
Compare
7ae0723
to
e8310d3
Compare
2f55113
to
55f5a05
Compare
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.
e8310d3
to
beea06b
Compare
NOTE: This PR is based on #1678 . I'll update the base once #1678 is merged
Jaeger, like OpenTracing, identifies the type of references between Spans. There are only two types of references
CHILD_OF
andFOLLOWS_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 withCHILD_OF
type, while all the other OTEL links are converted toFOLLOWS_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.
Merge requirements
Please take into account the following non-code changes that you may need to make with your PR: