-
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
Allow loading incomplete configuration #888
Comments
Also note that there is a separate public API for config validation - opentelemetry-collector/config/config.go Line 597 in 9d16f59
|
So, just to clarify. You suggest to move the check for presence of top-level "receivers" and "exporters" from config.Load to config.ValidateConfig. What would be the next step? To have a default hard-coded config with which the user defined config is merged or there is a different goal? |
Correct, if needed we can split it into two functions.
In Jaeger we want to merge the configs. Here is a blog post that explains configuration https://medium.com/jaegertracing/jaeger-embraces-opentelemetry-collector-90a545cbc24. Whether a similar approach would be implemented here it's up to the decision - I am not proposing it. |
Makes sense to me. There are several benefits: 1) it fits the Load/Validate model nicely, 2) it improves the customizability of the Collector, 3) potentially allows us to implement a similar "default config" capability in the core in the future (which you refer to in #886). Do you want to do a PR that implements your proposal? |
I will do this, because I got also confused about test coverage dropped in #909 and is because currently I cannot test verify config unless I am writing my own Load :) - first world problems I know :)) |
@pavolloffay I am worried that in #909 I removed some functionality you rely on. Can you tell me if you can still achieve what you want without that? |
Correct the #909 removed functionality Jaeger OTEL collector relied on. We wanted to use the Let me illustrate it: Jaeger by default uses
We wanted to also support adding components (e.g. processors) to the default/hardcoded pipeline - a user would just specify the processor in the There is one problem though, for instance Jaeger receiver implements multiple receivers (grpc, thrift, HTTP) and they cannot be disabled individually as a result of #909. So if one wants to disabled grpc endpoint that is by default enabled he will have to specify new jaeger receiver e.g. |
I will make sure for multi-protocol receivers to keep the disable at the protocol level and not the component level. Does that solve all your issues? Or you need back the entire functionality? I would also recommend to not do too much magic when it comes to add/remove components to the pipeline because that can cause unexpected behaviors. |
This is enough thanks. I can submit a PR to bring it back there. |
…etry#888) Signed-off-by: Bogdan Drutu <[email protected]>
Allow loading incomplete configuration with missing root level nodes like exporters, receivers.
Jaeger OTEL collector uses hardcoded default configuration. OTEL configuration file is also supported and it is merged with the default configuration. The issue is that users have to specify all parts of OTEL config even when they want to override a single property or just add one additional processor.
This PR adds config "merge" capability to Jaeger jaegertracing/jaeger#2211.
However
config.Load()
fails if receivers/exporters/service/pipeline is missing e.g.opentelemetry-collector/config/config.go
Line 357 in 9d16f59
The text was updated successfully, but these errors were encountered: