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

Add translation of InstrumentationLibraryInfo to Zipkin #800

Merged
merged 4 commits into from
Aug 17, 2020

Conversation

iNikem
Copy link
Contributor

@iNikem iNikem commented Aug 13, 2020

Changes

Add rules for translating InstrumentationLibraryInfo from OTLP to Zipkin

@iNikem iNikem requested review from a team and yurishkuro August 13, 2020 19:26
Comment on lines 82 to 89
### InstrumentationLibraryInfo

OpenTelemetry Span's `InstrumentationLibraryInfo` MUST be reported as `tags` to Zipkin using the following mapping.

| OpenTelemetry | Zipkin
| ------------- | ------ |
| `InstrumentationLibraryInfo.name`|`otel.instrumentationLibrary.name`|
| `InstrumentationLibraryInfo.version`|`otel.instrumentationLibrary.version`|
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this information is exclusive to Zipkin. This is applicable to any format that does not have the built-in notion of InstrumentationLibrary (which is probably every format other than OTLP).

I think it is best to extract this to a separate file that describes common translation rules for all formats. I would aim to have a semantic convention for others fields in OTLP that can be used if there is no equivalent field (or combination of fields) in the target format. We will need such mapping for all OTLP fields which do not have corresponding industry-wide recognition and are not present in all other formats.

https://github.com/open-telemetry/opentelemetry-collector/blob/master/translator/trace/protospan_translation.go is a good starting point of conventions that Collector already uses unofficially.

This is a common issue that every non-OTLP exporter in every SDK has to deal with (and obviously also the Collector when doing the translations).

I believe it will be useful to capture this in a single doc.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this document tries to become the official way to do the translation, so collector should follow this as well. This translation happens in multiple places sdks for every exporter and collecor

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bogdandrutu yes, that's what I meant, sorry if it was not clear. I am just saying it is better to put this information in a general translations file, not in the file which describes Zipkin translation, because we have the exact same problem to solve for Jaeger, for OpenCensus and any other format.


| OpenTelemetry | Zipkin
| ------------- | ------ |
| `InstrumentationLibraryInfo.name`|`otel.instrumentation_library.name`|
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also from the "Name Tracer/Meter" :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not called InstrumentationLibraryInfo in this spec. There is a reference to InstrumentationLibrary that points to OTEP instead of the document in this repo.

[`InstrumentationLibrary`][otep-83] instance which is stored on the created

Can you please send PR with the move of InstrumentaitonLibrary description from OTEP to specs? and rename InstrumentationLibraryInfo to InstrumentationLibrary

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will certainly rename InstrumentationLibraryInfo to InstrumentationLibrary. I took that name from Java SDK, my mistake.

But I am unsure about your second request. Do you ask me to make a PR to integrate otel-83 into spec? And that PR is pre-requirement for merging this PR?? Isn't that a huge scope creep?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iNikem it is. I'm hoping you can take this work item. I agree it's not part of this PR, this is why I asked if you can please send PR.

Renaming would be part of this one though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can create an issue about that and self-assigned it. I hope this PR (and its twin about Jaeger) can be merged without requirement of that issue to be resolved.

Copy link
Contributor Author

@iNikem iNikem Aug 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made #809 . Don't have permissions to assign it to myself.

Copy link
Member

@tigrannajaryan tigrannajaryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving.
@iNikem please add the issue as discussed here #801 (comment)

@iNikem
Copy link
Contributor Author

iNikem commented Aug 14, 2020

Created #806 as a follow-up

Copy link
Contributor

@anuraaga anuraaga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not blocker but find must to be too strict here


### InstrumentationLibraryInfo

OpenTelemetry Span's `InstrumentationLibraryInfo` MUST be reported as `tags` to Zipkin using the following mapping.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be MUST? Just for reference, for now in the otel x-ray exporter we are ignoring this information when exporting since it doesn't seem very useful for customers. We generally expect the span name and other attributes to provide enough - do we want to mandate this for all backends, including zipkin?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think "MUST" is the correct one, but we can ask @open-telemetry/specs-trace-approvers @open-telemetry/technical-committee

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think "MUST" fits. If this attribute is not reported then we will lose data during translation. IMO requirements that prevent data losses qualify for a "MUST".

@iNikem
Copy link
Contributor Author

iNikem commented Aug 14, 2020

@SergeyKanzhelev do you still want to block this PR?

Copy link
Contributor

@anuraaga anuraaga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not blocking, but still a concern about MUST. Is it possible for a user to delete these attributes? Since this happens at the exporter level, I'm not so sure. e.g., collector with OTLP receiver and zipkin exporter, attribute processor can be used to filter out attributes that a user doesn't need and wants to save space. Is it possible for similar for this protocol level field?

@iNikem
Copy link
Contributor Author

iNikem commented Aug 17, 2020

@yurishkuro Can this be merged now?

@SergeyKanzhelev
Copy link
Member

Not blocking, but still a concern about MUST. Is it possible for a user to delete these attributes? Since this happens at the exporter level, I'm not so sure. e.g., collector with OTLP receiver and zipkin exporter, attribute processor can be used to filter out attributes that a user doesn't need and wants to save space. Is it possible for similar for this protocol level field?

Interesting concern... I can see why it may be needed. I wonder if to implement it we need to allow span processors to set the InstrumentationLibrary to null or empty value to make the solution more generic. I think MUST here reflects the reality. Unless we declare the configuraiton properties for exporters, it is better to have consistent transformation across languages. In any case doens't look to be blocking this PR. Definitely thank you for bringing this concern! If you believe this needs to be addressed before GA - please file an issue. Otherwise I'd suggest we wait for the end user feedback

@SergeyKanzhelev
Copy link
Member

More than 2 business days since the last update and enough approvals

@SergeyKanzhelev SergeyKanzhelev merged commit 1af9464 into open-telemetry:master Aug 17, 2020
@iNikem iNikem deleted the library-info-zipkin branch August 17, 2020 18:36
MrAlias pushed a commit to open-telemetry/opentelemetry-go that referenced this pull request Sep 3, 2020
* Add InstrumentationLibrary info to Zipkin/Jaeger exporters

This addresses spec issues
 open-telemetry/opentelemetry-specification#800
 open-telemetry/opentelemetry-specification#801
and opentelemetry-go issues
 #1086
 #1087

* Reflect change in CHANGELOG
evantorrie added a commit to evantorrie/opentelemetry-go that referenced this pull request Sep 10, 2020
…metry#1119)

* Add InstrumentationLibrary info to Zipkin/Jaeger exporters

This addresses spec issues
 open-telemetry/opentelemetry-specification#800
 open-telemetry/opentelemetry-specification#801
and opentelemetry-go issues
 open-telemetry#1086
 open-telemetry#1087

* Reflect change in CHANGELOG
TommyCpp added a commit to TommyCpp/opentelemetry-rust that referenced this pull request Oct 4, 2020
TommyCpp added a commit to TommyCpp/opentelemetry-rust that referenced this pull request Oct 4, 2020
…ent version for Jaeger.

According to spec open-telemetry/opentelemetry-specification#800 and open-telemetry/opentelemetry-specification#801, We MUST export instrumentation library information for Jaeger and Zipkin exporter.

Use crate version as default Jaeger instrumentation library version in consistent with Zipkin.
jtescher pushed a commit to open-telemetry/opentelemetry-rust that referenced this pull request Oct 6, 2020
…ent version for Jaeger. (#243)

According to spec open-telemetry/opentelemetry-specification#800 and open-telemetry/opentelemetry-specification#801, We MUST export instrumentation library information for Jaeger and Zipkin exporter.
shbieng added a commit to shbieng/opentelemetry-go that referenced this pull request Aug 26, 2022
Gmanboy added a commit to Gmanboy/opentelemetry-rust that referenced this pull request Aug 12, 2024
…ent version for Jaeger. (#243)

According to spec open-telemetry/opentelemetry-specification#800 and open-telemetry/opentelemetry-specification#801, We MUST export instrumentation library information for Jaeger and Zipkin exporter.
carlosalberto pushed a commit to carlosalberto/opentelemetry-specification that referenced this pull request Oct 31, 2024
…ry#800)

* Add translation of InstrumentationLibraryInfo to Zipkin

* Update specification/trace/sdk_exporters/zipkin.md

Co-authored-by: Tigran Najaryan <[email protected]>

* Fix case

* Rename InstrumentationLibraryInfo to InstrumentationLibrary

Co-authored-by: Tigran Najaryan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants