-
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
Watch config file for changes #273
Comments
Hello folks, i have a question from customer: "We need to filter which logs we end to you guys. Right now, we use logspout API to make hot changes on container. With that we exclude logs from being sent to LogDNA. With this new LogObserver approach, we changed logspout for fluentd. Is there a way to hot-update those exclusions in fluentd? We thought about filtering in the OtelCollector GW that we’ll have for logs. If possible, we can centralize exclusions there, but we need a way to “hot-reload” its config." In this case, this options here would be useful? Thanks |
I would propose the following:
If this looks agreeable I would like to be assigned and start work on this. |
Another way of implementing this as done by prometheus is via an optional HTTP endpoint command:
|
I think manual trigger by http or signal is a reasonable behavior. In the end state I would probably expect live reloading based on file changes to be an opt-in behavior as it might cause unexpected side-effects but signal handling should be a default probably non-configurable behavior. An HTTP endpoint might make sense if there is already an HTTP API to the collector (not sure if this is the case). |
We already have implemented the logic to do restart, but we do not have the logic to "watch" for file change. See https://github.com/open-telemetry/opentelemetry-collector/blob/main/confmap/provider/fileprovider/provider.go#L49 where we don't do anything with |
@bogdandrutu would you be willing to accept a PR implementing the watch in the file provider? |
@swiatekm-sumo yes, but please check for an already existing PR and see why that did not get accepted, and try to fix that. |
* set proper resources for collector * increase resources and bump chart * bump limits * generate example * Update charts/opentelemetry-collector/values.yaml Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> * generate-examples * add upgrading example * change version * bump version * bump * comment Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Co-authored-by: birca <birca@adobe.com>
Viper has support for watching the configuration file for changes and it would be good to have a policy on what to do when that happens. Looking a bit around the code, I can see three main possibilities:
OnConfigChange
to all components, such as exporters and receivers, allowing them to be notified of config changes. This is the cleanest and probably best for the future, as it allows each component to hold incoming requests while in-flight requests finish.For the first and second options, it might also make sense to react on
SIGHUP
.The text was updated successfully, but these errors were encountered: