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

Clarify placement of exporter implementation #277

Conversation

tigrannajaryan
Copy link
Member

@tigrannajaryan tigrannajaryan commented Oct 1, 2019

There was unnecessarily suggestive wording that implied that vendor
exporters should be part of language libraries.

Added a clarification regarding vendor-specific exporters,
OpenTelemetry protocol exporter and standard output exporter.

@@ -16,7 +16,7 @@ _Note to Language Library Authors:_ OpenTelemetry specification, API and SDK imp

3. The developers of the final application normally decide how to configure OpenTelemetry SDK and what extensions to use. They should be also free to choose to not use any OpenTelemetry implementation at all, even though the application and/or its libraries are already instrumented. The rationale is that third-party libraries and frameworks which are instrumented with OpenTelemetry must still be fully usable in the applications which do not want to use OpenTelemetry (so this removes the need for framework developers to have "instrumented" and "non-instrumented" versions of their framework).

4. Language library implementation must be clearly separated into wire protocol-independent parts that implement common logic (e.g. batching, tag enrichment by process information, etc.) and protocol-dependent telemetry exporters. Telemetry exporters must contain minimal functionality, thus enabling vendors to easily add support for their specific protocol to the language library.
4. Language library implementation must be clearly separated into wire protocol-independent parts that implement common logic (e.g. batching, tag enrichment by process information, etc.) and protocol-dependent telemetry exporters. Telemetry exporters must contain minimal functionality, thus enabling vendors to easily add support for their specific protocol.
Copy link
Contributor

Choose a reason for hiding this comment

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

To my reading, this still implies that support would be added to the open telemetry projects, not hosted by the vendors themselves. I think it should be made very clear that open telemetry will not be hosting vendor-specific exporters, but that vendors will need to provide those themselves, hosted outside of the OT project.

Copy link
Member

@Oberon00 Oberon00 Oct 1, 2019

Choose a reason for hiding this comment

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

So do Jaeger and Prometheus not count as vendors?

Also, Python currently has a MS Azure exporter.

EDIT: Maybe we should distinguish between repositories and packages here, e.g. while the Azure exporter in Python is in the same repository as the core OTel library, it has to be installed explicitly & separately.

Copy link
Member

@reyang reyang Oct 1, 2019

Choose a reason for hiding this comment

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

Probably off topic a little bit, besides exporters there are also propagators - currently have Zipkin specific correlation (a.k.a. B3 headers) in OT Python - and it is part of the core SDK (the same repo, and the same package) https://github.com/open-telemetry/opentelemetry-python/blob/master/opentelemetry-sdk/src/opentelemetry/sdk/context/propagation/b3_format.py.

@bogdandrutu
Copy link
Member

@tigrannajaryan please make it very clear that we do not allow any vendor specific code in the repos.

@carlosalberto
Copy link
Contributor

IIRC we were supposed to host Jaeger/Zipkin/Prometheus exporters, both as reference and also because of their open source nature (as compared to, say, the Azure one, which will have to be moved out eventually).

That means we should prepare for putting the aforementioned exporters in their own repo?

There was unnecessarily suggestive wording that implied that vendor
exporters should be part of language libraries.

Added a clarification regarding vendor-specific exporters,
OpenTelemetry protocol exporter and standard output exporter.
@tigrannajaryan tigrannajaryan force-pushed the feature/tigran/fixsdkguildelines branch from b2d8f7a to 3003aa7 Compare October 1, 2019 18:34
@tigrannajaryan tigrannajaryan changed the title Remove confusing wording regarding vendor exporters Clarify placement of exporter implementation Oct 1, 2019
@tigrannajaryan
Copy link
Member Author

tigrannajaryan commented Oct 1, 2019

I added further clarification as discussed in spec SIG meeting today. See requirement 5.


5. Language library implementation should include an exporter for OpenTelemetry Protocol (when the protocol is specified and approved) and may include an exporter that writes to standard output (to use for debugging and testing). Vendor-specific exporters (exporters that implement vendor protocols) should not be included in language libraries and should be placed elsewhere (the exact approach for storing and maintaining vendor-specific exporters will be defined in the future).
Copy link
Member

Choose a reason for hiding this comment

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

Vendor-specific exporters (exporters that implement vendor protocols) should not be included in language libraries and should be placed elsewhere (the exact approach for storing and maintaining vendor-specific exporters will be defined in the future).

Right now we keep some vendor-specific exporters in the OT python repo, but publish separate distribution packages for each. So e.g. to export traces to azure monitor, a user would have to install opentelemetry-ext-azure-monitor.

It's not clear from the text, but from the SIG call this morning it sounds like these exporters should also be in separate repos from the main project?

Copy link
Member Author

Choose a reason for hiding this comment

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

IMO, vendor-specific exporters do not belong neither in the Otel repo, nor in the distrubution.

The reason for not including in the repo is to avoid additional maintanance burden for core maintainers.

The reason for not including in the distribution is to avoid bloating packaging and runtime dependency applications must use.

Now, if a particular language SIG decides they want to have batteries-included SDK I do not see a big harm if they provide 2 packages: a bare "sdk" which does not include vendor-specific exporters and an "sdk-full" which includes them. Just make sure to have enough transparency and avoid vendor-influenced decision when doing so.

Copy link
Member

Choose a reason for hiding this comment

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

That sounds reasonable to me, but this is likely to mean more maintenance work for us, not less. Even still, it might be worth making this change to avoid privileging the exporters we maintain over others.

Copy link
Member

@elskwid elskwid Oct 2, 2019

Choose a reason for hiding this comment

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

@c24t we are having a similar discussion on the ruby-side in regards to auto-instrumentation, and it will be part of our discussion for exporters. The thinking being it may be advantageous in the short-term to have them in the same repo, especially while the api/sdk libs are still forming. The privileging aspect is something I hadn't considered.

@c24t
Copy link
Member

c24t commented Oct 1, 2019

Telemetry exporters must contain minimal functionality, thus enabling vendors to easily add support for their specific protocol.

What's the motivation for putting an extensible exporter class in the SDK instead of an interface in the API? As I understand it, we've got three personas to consider:

  • library devs who use OT to generate telemetry data for their library, only depend on the API.
  • application owners who use the API (and maybe SDK) in application code, depend on a particular SDK.
  • vendors who may ship their own SDK or exporter library to be used by in applications.

Library devs shouldn't use exporters, so from their perspective it makes sense to leave them out of the API. But then vendors are forced to depend on the SDK, even if they're just using it to type-check their exporter implementation.

I know this has been covered before, but I don't see a good source in this repo. Please let me know if there's a discussion in a comment or doc somewhere.

Motivated by a question on python metrics exporters.

@tigrannajaryan
Copy link
Member Author

What's the motivation for putting an extensible exporter class in the SDK instead of an interface in the API? As I understand it, we've got three personas to consider:

* **library devs** who use OT to generate telemetry data for their library, only depend on the API.

* **application owners** who use the API (and maybe SDK) in application code, depend on a particular SDK.

* **vendors** who may ship their own SDK or exporter library to be used by in applications.

Library devs shouldn't use exporters, so from their perspective it makes sense to leave them out of the API.

I agree. There is no need to make exporters and exporter API a dependency for library devs.

But then vendors are forced to depend on the SDK, even if they're just using it to type-check their exporter implementation.

They only need to depend on Exporter interface (https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/sdk-tracing.md#span-exporter). The spec does not currently define whether Exporter interface can be a separate package so that vendor-specific exporter have less dependencies. Probably it should, we can clarify this in a separate PR.


5. Language library implementation should include an exporter for OpenTelemetry Protocol (when the protocol is specified and approved) and may include an exporter that writes to standard output (to use for debugging and testing). Vendor-specific exporters (exporters that implement vendor protocols) should not be included in language libraries and should be placed elsewhere (the exact approach for storing and maintaining vendor-specific exporters will be defined in the future).
Copy link
Member

Choose a reason for hiding this comment

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

Can we please include Zipkin and/or Jaeger for tracing and Prometheus for metrics as a privileged exporters which are recommended to be implemented for all languages.

Copy link
Member Author

Choose a reason for hiding this comment

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

@SergeyKanzhelev I am happy to make the change in this PR if the Spec SIG / TC makes the decision.

It looks like at least one language library author (@c24t) believes including Zipkin, Jaeger, Prometheus in the SDK is easier from maintenance perspective than keeping it to a separate repo. If we have other voices supporting this position I think we should go ahead with that.

One more related data point: for OpenTelemetry Collector we decided that OpenCensus, Zipkin, Jaeger, Prometheus protocol support will be part of Collector "core" while the rest will be moved to a "contrib" repo. This is because we believed the Collector artifact that we produce needs to be usable in production as-is without requiring end users to build their own (which obviously requires some real-world protocols to be supported). The requirements for SDK are a bit different (end users of SDK are building their own apps anyway) but if we aim for uniformity then we can decide to support the same protocols in core SDKs.

Copy link
Member

@SergeyKanzhelev SergeyKanzhelev left a comment

Choose a reason for hiding this comment

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

If you can include the note about exporters that we can recommend as a demo exporters - this PR will close this issue #6

@tigrannajaryan
Copy link
Member Author

tigrannajaryan commented Oct 2, 2019

If you can include the note about exporters that we can recommend as a demo exporters - this PR will close this issue #6

@SergeyKanzhelev sure, I can add a note. Do you want to make a call as a TC member and post the list of recommended exporters here or in the linked issue and I can make it part of this PR?

@SergeyKanzhelev
Copy link
Member

@tigrannajaryan would you please make this change as a separate PR. I'm merging this one

@SergeyKanzhelev SergeyKanzhelev merged commit e5c1a22 into open-telemetry:master Oct 3, 2019
@tigrannajaryan tigrannajaryan deleted the feature/tigran/fixsdkguildelines branch October 3, 2019 13:50
tigrannajaryan pushed a commit to tigrannajaryan/opentelemetry-specification that referenced this pull request Oct 3, 2019
Based on previous discussion [1] this PR adds a recommendation to include
exporters for several open-source protocols in language libraries.

[1] - open-telemetry#277 (comment)
tigrannajaryan pushed a commit to tigrannajaryan/opentelemetry-specification that referenced this pull request Oct 3, 2019
Based on previous discussion [1] this PR adds a recommendation to include
exporters for several open-source protocols in language libraries.

[1] - open-telemetry#277 (comment)
tigrannajaryan pushed a commit to tigrannajaryan/opentelemetry-specification that referenced this pull request Oct 3, 2019
Based on previous discussion [1] this PR adds a recommendation to include
exporters for several open-source protocols in language libraries.

Addresses issue open-telemetry#6

[1] - open-telemetry#277 (comment)
@tigrannajaryan
Copy link
Member Author

@tigrannajaryan would you please make this change as a separate PR. I'm merging this one

Added a separate PR to describe recommended exporters: #284

bogdandrutu pushed a commit that referenced this pull request Oct 5, 2019
* Add list of exporters that are recommended for SDK

Based on previous discussion [1] this PR adds a recommendation to include
exporters for several open-source protocols in language libraries.

Addresses issue #6

[1] - #277 (comment)

* PR fixes
SergeyKanzhelev pushed a commit to SergeyKanzhelev/opentelemetry-specification that referenced this pull request Feb 18, 2020
There was unnecessarily suggestive wording that implied that vendor
exporters should be part of language libraries.

Added a clarification regarding vendor-specific exporters,
OpenTelemetry protocol exporter and standard output exporter.
SergeyKanzhelev pushed a commit to SergeyKanzhelev/opentelemetry-specification that referenced this pull request Feb 18, 2020
* Add list of exporters that are recommended for SDK

Based on previous discussion [1] this PR adds a recommendation to include
exporters for several open-source protocols in language libraries.

Addresses issue open-telemetry#6

[1] - open-telemetry#277 (comment)

* PR fixes
carlosalberto pushed a commit to carlosalberto/opentelemetry-specification that referenced this pull request Oct 31, 2024
There was unnecessarily suggestive wording that implied that vendor
exporters should be part of language libraries.

Added a clarification regarding vendor-specific exporters,
OpenTelemetry protocol exporter and standard output exporter.
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.