-
Notifications
You must be signed in to change notification settings - Fork 148
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
otel: trim non-otel configuration from when validating the otel configuration #6235
Comments
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
@kaanyalti I updated the description with more details. Thinking more about this, I think it is a bit more complicated than I initially thought. Looking at the otel configuration docs there are multiple protocols supported for the config (env, file, http). For our use case, I don't think we need to support all of these, I'd be happy with just validating file paths and the file protocol for now ( If we expect the agent collector to support loading agent config from different protocols like otel does, then we should probably have a follow up ticket for it. |
@mauri870 looking at the otel collector code, I don't think we can enforce our clients to only use local files. The config provider interface allows users to provide config in any supported format
I may be missing some config option that may make implementation of this issue simpler. I have a meeting with @michalpristas tomorrow to discuss the implementation details here. Hopefully we can figure something out. |
Looking at the otel cli flags we have, I think we are relaying whatever config path is provided directly to otel, so we are not putting any restrictions here either. I am guessing this is the intended behaviour as we want the otel collector to behave the same as it does outside of the agent
|
After discussing with @michalpristas, here's what I will implement
|
ok, another quick update. I spoke too soon, what I mentioned above seems to be not possible without reimplementing what otel has as the functions that may make this implementation possible are not exported. I am going to prepare a document explaining why this implementation is not possible at the moment, and will possibly propose a change in otel. |
Ok found a way to implement this, will post a PR as soon as I have a draft that demonstrates what I'm doing |
Now with the groundwork for the hybrid agent done in #5796 it is possible to have a yaml config file with both beats and otel configuration, for example:
hybrid-agent-config.yml
When running
./elastic-agent otel validate --config=./hybrid-agent-config.yml
I get the following error:When validating this file, we need to remove any top-level Beats-specific configuration to ensure that only the OpenTelemetry-specific components are validated.
The text was updated successfully, but these errors were encountered: