-
Notifications
You must be signed in to change notification settings - Fork 1.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
Question: Is there a good way to split the collector? #7961
Comments
I am not sure using For a WebAssembly based solution, see open-telemetry/opentelemetry-collector-contrib/issues/11772, which was abandoned but could be retaken. This could be done in pure Go. I also wonder if we could leverage OpAMP to do this. I tried doing this but got delayed by other priorities, but I think, while OpAMP package installation is designed for version updates, using it for installing different Collector versions that have different component sets should work. |
oh me neither. It was the first practical solution that worked well for me, at least locally ( But since the same source tree should always be used in the Linux packaging scenario and it refers to packaging exclusively under Linux, I didn't see any problems so far. Furthermore, because it did not change anything in the current distributions. It would legendarily create another "otel-plugin" distro. Just as an aside, go plugins are not exactly ideal because of the file size. An empty collector + otlpreceiver + loggingexporter would consume ~100MB disk space. 😅 $ ls -la
.rwxr-xr-x@ 38M frzifus 23 Jun 23:10 otelplugcol
.rw-r--r--@ 28M frzifus 23 Jun 23:08 loggingexporter.so
.rw-r--r--@ 33M frzifus 23 Jun 23:06 otlpreceiver.so
It looks like collector-contrib#11772 is a bit different. It focuses on adding a (e.g. processor) to a collector distro, which can then load other wasm processors. I am looking for a seamless integration where the default collector is delivered without a single processor, receiver or exporter, but those can be added by once needed. But yes, basically you need a wasi runtime in pure go, a way to hide loaded and created vm's behind the factory interfaces, and the ability to make requests of any kind from within these vm's. (e.g. to read env variables and use them inside a processor or establish a tcp connection to act like an exporter)
In that sense that your OpAMP server would build a new distro, based on your needs and tell the client to exchange the existing one? In that case, its hard to support it. Building distros on demand was recently discussed in the operator SIG and had turned out to be tricky and seems to end up in a new k8s distro. In principle, I think such a plugin system could also positively influence the operator. The proposed set of components for a Kubernetes distro could be included in the bundle and, if necessary, additional modules could be made available to the operator via configmap. Removing the need of building specific distros. |
It seems like the current code in opentelemetry-collector used as a library can support having this as a downstream distro. I think it's good if we try this out, but as I said above, I am skeptical that the
What I was trying to say is that open-telemetry/opentelemetry-collector-contrib/issues/11772 would bring us one step closer to make Collector components installable separately. It is not a complete solution (it seems directly applicable only to processors and connectors), but it does bring a couple of good ideas that can be reused for working towards a full solution.
Yes, that's basically what I had in mind
Thanks for the link! Reading through the meeting notes I don't quite understand what parts seem hard. Could you elaborate on that? I think any solution is going to be hard, so I wouldn't want to discard this approach right off the start. |
Is your feature request related to a problem? Please describe.
I'm not sure if the issue belongs here or more in contrib, but...
Currently
core
andcontrib
apk's
,deb's
andrpm's
are published for the linux package managers. Distributions with a specific set of components can only be created by a custom build (e.g. with the help ofocb
). This package must then be installed manual or made available via extra package sources.I am looking for a way to divide the collector into different modules and make them installable via a package manager.
Example
Describe the solution you'd like
Some way to dynamically load extensions, receivers, connectors and exporters into the collector.
Describe alternatives you've considered
I haven't really looked into it yet, but I have seen that go might support WASI in the future. Maybe it would be a possibility to load modules into a WASI runtime.
Additional context
With a few modifications, I got a prototype up and running. I replaced the
components.go
file and added a main file in a plugin folder in theotlpreceiver
andloggingexporter
components.See: diff to v0.80.0
The text was updated successfully, but these errors were encountered: