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 document defining an OpenTelemetry Collector #4313

Open
wants to merge 29 commits into
base: main
Choose a base branch
from

Conversation

codeboten
Copy link
Contributor

Changes

Adds a definition of an OpenTelemetry Collector


- An OpenTelemetry Collector _MUST_ accept a OpenTelemetry Collector Config file.
- An OpenTelemetry Collector _MUST_ be able to be compiled with any and all
additional Collector plugins that the user wishes to include.
Copy link
Member

Choose a reason for hiding this comment

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

Should this specification define what an OpenTelemetry Collector plugin is? Is it any component of type receiver, processor, exporter, extension, or config map provider?

Copy link
Member

Choose a reason for hiding this comment

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

Specification needs to define all the terms used in this definition, otherwise it does not remove ambiguity.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed plugin to component and added a section to define OpenTelemetry Collector component.

specification/collector/README.md Outdated Show resolved Hide resolved
specification/collector/README.md Outdated Show resolved Hide resolved
specification/collector/README.md Outdated Show resolved Hide resolved
specification/collector/README.md Show resolved Hide resolved
Comment on lines 24 to 25
For a library to be considered an OpenTelemetry Collector component, it _MUST_
implement the [Component interface](https://github.com/open-telemetry/opentelemetry-collector/blob/main/component/component.go)
Copy link
Member

Choose a reason for hiding this comment

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

The Collector also accepts confmap.Providers and confmap.Converters, which do not accept this interface. Do we consider those out of scope?

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 they do need to be considered in scope. Interoperability of those components is important.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The Collector also accepts confmap.Providers and confmap.Converters, which do not accept this interface. Do we consider those out of scope?

I wonder if including them would allow us to avoid having to include a definition for a config file, wdyt?

Copy link
Member

Choose a reason for hiding this comment

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

Providers handle configuration abstractly so they help remove the need for how configuration should be represented, but they don't solve the schema part (which I don't feel like we need to solve tbh)

specification/collector/README.md Outdated Show resolved Hide resolved
specification/collector/README.md Outdated Show resolved Hide resolved
Comment on lines +9 to +12
The goal of this document is for users to be able to easily switch between
OpenTelemetry Collector Distros while also ensuring that components produced by
the OpenTelemetry Collector SIG are able to work with any vendor who claims
support for an OpenTelemetry Collector.
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure I understand this goal. If a vendor produces a collector distribution that has a subset of available components because those are the components relevant to their service offerings and that they're willing to support, where do any other components (whether hosted in an OTel repo or not) fit into that picture? Do we mean that a distribution must offer end users the ability to modify its source and create their own build? We should be explicit about that if that is the case.

Given that the licensing of the collector's source code does not require that distribution of derivative works happen in source form I'm not sure that we have much ability here to enforce such a requirement. We can certainly try to use the "OpenTelemetry" mark as a cudgel, but I'm not sure it'll be as effective as may be desirable since the terms "collector" and "distribution" are very broad. It could perhaps be argued that "OpenTelemetry Collector" is a protectable mark and maybe even that "Collector" has acquired secondary meaning in this limited scope, but protecting such a mark against genericization is going to be a Sisyphean task.

Copy link
Member

Choose a reason for hiding this comment

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

I see this definition as separation from the term Distribution defined below. A Distribution is a specific compiled OpenTelemetry Collector with a specific set of OpenTelemetry Collector Components that the maintainer (the user in this case) decided to add. It is a OpenTelemetry Collector bc the maintainer was able to bring their chosen OpenTelemetry Collector components to it.

Something is not an OpenTelemetry Collector if it cannot support OpenTelemetry Collector Components. Maybe the word additional below is unnecessary and could be removed?

Copy link
Member

Choose a reason for hiding this comment

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

Given that the licensing of the collector's source code does not require that distribution of derivative works happen in source form I'm not sure that we have much ability here to enforce such a requirement

We potentially have leverage over:

  • Trademark usage if "OpenTelemetry Collector" becomes a trademark
  • What we list on our registry and website and what we promote
  • What wording can be used in 'official' OTel events

I think we have enough leverage here to make this worth it

Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure that having a registered "OpenTelemetry Collector" mark is sufficient here as nominative fair use would allow anyone preparing a distribution (in the colloquial sense, not Distribution however we seek to define it) to identify it as such. The Linux Foundation trademark usage guidelines also call out specifically this sort of usage as acceptable for indicating products are related to or based on the project that produces the product bearing their marks.

Obviously the project can control what it puts on its website and what marketing collateral is used in conjunction with events operated by LF/CNCF, but that doesn't seem like effective leverage over an actor who has no need or interest in such things.

specification/collector/README.md Outdated Show resolved Hide resolved
specification/collector/README.md Show resolved Hide resolved
Comment on lines 24 to 25
For a library to be considered an OpenTelemetry Collector component, it _MUST_
implement the [Component interface](https://github.com/open-telemetry/opentelemetry-collector/blob/main/component/component.go)
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 they do need to be considered in scope. Interoperability of those components is important.

to: collector/README.md
--->

# OpenTelemetry Collector
Copy link
Member

Choose a reason for hiding this comment

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

OpenTelemetry Collector is never defined. Is it a source code artifact? A binary?

Copy link
Member

Choose a reason for hiding this comment

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

That's one of the things I was trying to get at here. Since there's no binary plugin mechanism it seems that the source would need to be available for it to be extended in the manner contemplated, but that's not clear or explicit in the current state.

Copy link
Member

Choose a reason for hiding this comment

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

Since there's no binary plugin mechanism it seems that the source would need to be available for it to be extended in the manner contemplated, but that's not clear or explicit in the current state.

Is the lack of binary plugin mechanism something that the OpenTelemetry Collector SIG wants to solve? Are there technical blockers?

Binary and dynamic loading plugin seem to be an established pattern. For example:

Copy link
Member

Choose a reason for hiding this comment

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

The Fluent Bit example is not necessarily apposite as it involves a C application dynamically loading shared libraries built with the Go toolchain using CGO (which is generally prohibited in the Collector codebase).

Go does have a native plugin mechanism, though it comes with many caveats and is widely regarded as a bad idea that can't be dropped due to compatibility guarantees. Its documentation sums up its litany of restrictions in this way, which sounds a lot like a suggestion to use something like ocb:

Together, these restrictions mean that, in practice, the application and its plugins must all be built together by a single person or component of a system. In that case, it may be simpler for that person or component to generate Go source files that blank-import the desired set of plugins and then compile a static executable in the usual way.

Comment on lines +9 to +12
The goal of this document is for users to be able to easily switch between
OpenTelemetry Collector Distros while also ensuring that components produced by
the OpenTelemetry Collector SIG are able to work with any vendor who claims
support for an OpenTelemetry Collector.
Copy link
Member

Choose a reason for hiding this comment

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

Given that the licensing of the collector's source code does not require that distribution of derivative works happen in source form I'm not sure that we have much ability here to enforce such a requirement

We potentially have leverage over:

  • Trademark usage if "OpenTelemetry Collector" becomes a trademark
  • What we list on our registry and website and what we promote
  • What wording can be used in 'official' OTel events

I think we have enough leverage here to make this worth it

specification/collector/README.md Show resolved Hide resolved
Copy link

@jaronoff97 jaronoff97 left a comment

Choose a reason for hiding this comment

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

two minor suggestions, otherwise this looks great! Thank you Alex!

specification/collector/README.md Outdated Show resolved Hide resolved
specification/collector/README.md Outdated Show resolved Hide resolved
Copy link

@jaronoff97 jaronoff97 left a comment

Choose a reason for hiding this comment

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

Thank you Alex 🙇

Copy link
Contributor

@tedsuo tedsuo left a comment

Choose a reason for hiding this comment

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

Thanks Alex, this definition really captures the heart of it. A+

Signed-off-by: Alex Boten <[email protected]>
@carlosalberto
Copy link
Contributor

Overall LGTM, but I suggest there's a (minor) clarification around this comment:

Do we mean that a distribution must offer end users the ability to modify its source and create their own build? We should be explicit about that if that is the case.

As the bottom part mentions that, for vendor distros, this is a SHOULD instead.

Signed-off-by: Alex Boten <[email protected]>
@codeboten
Copy link
Contributor Author

Overall LGTM, but I suggest there's a (minor) clarification around this comment:

Do we mean that a distribution must offer end users the ability to modify its source and create their own build? We should be explicit about that if that is the case.

As the bottom part mentions that, for vendor distros, this is a SHOULD instead.

Updated should to must, PTAL

Comment on lines +60 to +62
of an OpenTelemetry Collector with a specific set of components and features. A
Distribution author _MUST_ provide users with tools and/or documentation for adding
their own components to the Distribution's components. Note that the resulting
Copy link
Member

Choose a reason for hiding this comment

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

This seems problematic to me as a MUST. This is, in effect, a requirement that distributions be made available in source form with a license that permits modification (and presumably distribution, though that's not clear). The license under which the Collector is released does not require this and I'm suspicious of the ability to use trademark protections to prevent someone from using the phrasing "Foo Distribution for OpenTelemetry Collector" given that's literally the first "Correct" example in the Linux Foundation trademark guidelines and is a textbook case of nominative fair use.

I think if we want an identifier for compatible distributions that can be effectively controlled we will need a distinctive mark for a compatibility certification that can be granted to distributions that satisfy its requirements, similar to what @tedsuo seems to be describing here.

Beyond those concerns, this requirement also seems excessively vague. What qualifies as "tools and/or documentation"? Is a link to https://go.dev/dl/ sufficient? This probably requires a definition similar to "Corresponding Source" from AGPL-3, which again reinforces the limitations that come from not having this be part of the license under which the collector source code is made available.

Copy link
Member

Choose a reason for hiding this comment

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

The spirit here is to allow users to reuse their components when they move from one distribution to another: the engineering investments made should not be lost. If the distribution is open source and there's clear documentation how to add a new component to it, that's good enough for me. If the distribution is not open source but allows me to enter the Go module name on a web interface somewhere and get a binary out, that's also fine.

I'd see that binary as "tainted" (to use the kernel terminology) and the final binary might not be officially supported (with SLAs) by a service provider, but as an end-user, I'm not locked in.

Comment on lines +9 to +12
The goal of this document is for users to be able to easily switch between
OpenTelemetry Collector Distros while also ensuring that components produced by
the OpenTelemetry Collector SIG are able to work with any vendor who claims
support for an OpenTelemetry Collector.
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure that having a registered "OpenTelemetry Collector" mark is sufficient here as nominative fair use would allow anyone preparing a distribution (in the colloquial sense, not Distribution however we seek to define it) to identify it as such. The Linux Foundation trademark usage guidelines also call out specifically this sort of usage as acceptable for indicating products are related to or based on the project that produces the product bearing their marks.

Obviously the project can control what it puts on its website and what marketing collateral is used in conjunction with events operated by LF/CNCF, but that doesn't seem like effective leverage over an actor who has no need or interest in such things.

to: collector/README.md
--->

# OpenTelemetry Collector
Copy link
Member

Choose a reason for hiding this comment

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

The Fluent Bit example is not necessarily apposite as it involves a C application dynamically loading shared libraries built with the Go toolchain using CGO (which is generally prohibited in the Collector codebase).

Go does have a native plugin mechanism, though it comes with many caveats and is widely regarded as a bad idea that can't be dropped due to compatibility guarantees. Its documentation sums up its litany of restrictions in this way, which sounds a lot like a suggestion to use something like ocb:

Together, these restrictions mean that, in practice, the application and its plugins must all be built together by a single person or component of a system. In that case, it may be simpler for that person or component to generate Go source files that blank-import the desired set of plugins and then compile a static executable in the usual way.

Copy link

github-actions bot commented Jan 1, 2025

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Jan 1, 2025
@jpkrohling jpkrohling removed the Stale label Jan 2, 2025
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.