-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[translator/jaeger] Add refType as attribute to link when translating Jaeger spans to OTEL #14463
[translator/jaeger] Add refType as attribute to link when translating Jaeger spans to OTEL #14463
Conversation
@@ -27,6 +27,7 @@ import ( | |||
"go.opentelemetry.io/collector/pdata/pcommon" | |||
"go.opentelemetry.io/collector/pdata/ptrace" | |||
conventions "go.opentelemetry.io/collector/semconv/v1.6.1" | |||
conventions1_9 "go.opentelemetry.io/collector/semconv/v1.9.0" |
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.
I would like some guidance on this part. Could we just migrate to v1.9.0
?
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.
Ive no exp with that. @Aneurysm9, @jpkrohling could you give some input (noticed you updated the documentation in the past)?
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.
If v1.6.1
does not contain the required attribute then migrate to a version that does. There should generally only be one version of the semantic conventions imported into any given module.
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.
I updated the files to only use v1.9.0
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
1edb6c3
to
b8090ba
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.
lgtm, up to the others
I'm adding this to my review queue. |
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.
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.
Sorry for taking so long to review this one. Looks like some checks are failing, once they are addressed, this is ready to be merged. |
b8090ba
to
47870de
Compare
Following OTEL's trace semantic conventions for Opentracing traces. When creating a link the attribute `opentracing.ref_type` will be set with one of the accepted values, either `child_of` or `follows_from`. This enables the translator to maintain reference context that enable features. For example, Jaeger multiple parents for spans. https://opentelemetry.io/docs/reference/specification/trace/semantic_conventions/compatibility/#opentracing
47870de
to
9c61b3b
Compare
Hi @jpkrohling I need you to approve running the workflow :) There was a breaking change in one of the APIs I was using that was merged to master, that's why it was failing. |
CI started. |
Thanks @jpkrohling it seems all the tests are passing :) |
… Jaeger spans to OTEL (open-telemetry#14463) Add refType as attribute to link Following OTEL's trace semantic conventions for Opentracing traces. When creating a link the attribute `opentracing.ref_type` will be set with one of the accepted values, either `child_of` or `follows_from`. This enables the translator to maintain reference context that enable features. For example, Jaeger multiple parents for spans. https://opentelemetry.io/docs/reference/specification/trace/semantic_conventions/compatibility/#opentracing
This version includes the changes to the Jaeger translator that support multi ChildOf references to the links. open-telemetry/opentelemetry-collector-contrib#14463 We used to do this before translating to OTEL and after translating from OTEL, in order to keep this information and pass the Jaeger certification tests.
This version includes the changes to the Jaeger translator that support multi ChildOf references to the links. open-telemetry/opentelemetry-collector-contrib#14463 We used to do this before translating to OTEL and after translating from OTEL, in order to keep this information and pass the Jaeger certification tests.
This version includes the changes to the Jaeger translator that support multi ChildOf references to the links. open-telemetry/opentelemetry-collector-contrib#14463 We used to do this before translating to OTEL and after translating from OTEL, in order to keep this information and pass the Jaeger certification tests.
This version includes the changes to the Jaeger translator that support multi ChildOf references to the links. open-telemetry/opentelemetry-collector-contrib#14463 We used to do this before translating to OTEL and after translating from OTEL, in order to keep this information and pass the Jaeger certification tests.
This version includes the changes to the Jaeger translator that support multi ChildOf references to the links. open-telemetry/opentelemetry-collector-contrib#14463 We used to do this before translating to OTEL and after translating from OTEL, in order to keep this information and pass the Jaeger certification tests.
This version includes the changes to the Jaeger translator that support multi ChildOf references to the links. open-telemetry/opentelemetry-collector-contrib#14463 We used to do this before translating to OTEL and after translating from OTEL, in order to keep this information and pass the Jaeger certification tests.
This version includes the changes to the Jaeger translator that support multi ChildOf references to the links. open-telemetry/opentelemetry-collector-contrib#14463 We used to do this before translating to OTEL and after translating from OTEL, in order to keep this information and pass the Jaeger certification tests.
Following OTEL's trace semantic conventions for Opentracing traces. When creating a link the attribute
opentracing.ref_type
will be set with one of the accepted values, eitherchild_of
orfollows_from
.This enables the translator to maintain reference context that enable features. For example, Jaeger multiple parents for spans.
https://opentelemetry.io/docs/reference/specification/trace/semantic_conventions/compatibility/#opentracing
Testing:
Unittest have been up updated to include the case when a span has 2 parent spans. Assertions are made for:
opentracing.ref_type
to Jaeger traces the correct refType is created.The usage of these attributes and the multiple parents use case was discussed with the Jaeger maintainers, see jaegertracing/jaeger#3919 (comment) for more context.
resolves #14465