-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[cmd/opampsupervisor] Make configuration merge more customizable through special config files #40295
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
[cmd/opampsupervisor] Make configuration merge more customizable through special config files #40295
Conversation
|
Any chance to avoid the term magic? Would you please describe the intent, it looks like you have enough design going on a small RFC would help. |
The only other term that comes to my head and doesn't create even more confusion would be "special", which we could also use. Do you have any other suggestions, @atoulme?
We already have the initial intent in #39963, which was to be able to have local config files added into the configuration stack at the lowest priority level. The idea for the technical approach comes from a suggestion in the same issue. If really necessary for this I can try to write an RFC. @evan-bradley, by chance do you already have something written somewhere about those future plans for writing all configs to disk and letting the Collector itself merge them all? |
evan-bradley
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this @douglascamata. I've only looked at the specification so far since I want to get that right before focusing on the implementation.
…tor-contrib into supervisor-config-file-revamp
|
Hey folks, I updated the PR with your feedback. The "magic" config files were renamed to "special". The behavior now when any special config file is not present is to modify the config file list to achieve the following order:
|
Signed-off-by: Douglas Camata <[email protected]>
Signed-off-by: Douglas Camata <[email protected]>
Signed-off-by: Douglas Camata <[email protected]>
Signed-off-by: Douglas Camata <[email protected]>
…tor-contrib into supervisor-config-file-revamp
Failure link: https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/16021365184/job/45198938497?pr=40295 Exact failure message: ``` panic: failed to create SDK: binding address 127.0.0.1:38499 for Prometheus exporter: listen tcp 127.0.0.1:38499: bind: address already in use ```
|
@evan-bradley thanks again for another great review. Everything was taken care off. Please have another look when you can. |
…ehavior Signed-off-by: Douglas Camata <[email protected]>
@douglascamata Sorry I missed this before. I think this part can be implemented separately from the rest of this PR. It relates to the work in this RFC, though we may be able to just use the existing feature gate without any issues. I haven't written this down anywhere, I was just thinking we should do it because we want to rely on the Collector to handle its own configuration as much as possible. |
Signed-off-by: Douglas Camata <[email protected]>
Signed-off-by: Douglas Camata <[email protected]>
…tor-contrib into supervisor-config-file-revamp
Signed-off-by: Douglas Camata <[email protected]>
Signed-off-by: Douglas Camata <[email protected]>
Signed-off-by: Douglas Camata <[email protected]>
Signed-off-by: Douglas Camata <[email protected]>
Signed-off-by: Douglas Camata <[email protected]>
…`own metrics` -> `own telemetry` ) Signed-off-by: Douglas Camata <[email protected]>
Signed-off-by: Douglas Camata <[email protected]>
evan-bradley
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More or less looks good to me, just two questions.
Signed-off-by: Douglas Camata <[email protected]>
evan-bradley
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @douglascamata!
If you can fix the merge conflict, this looks good to me.
…tor-contrib into supervisor-config-file-revamp Signed-off-by: Douglas Camata <[email protected]>
|
@evan-bradley conflict fixed. Thanks for bearing with me all this time. 🥂 |
…ugh special config files (open-telemetry#40295) Co-authored-by: Evan Bradley <[email protected]>
Description
This PR refactors the logic of the configuration loading and merging in the
cmd/opampsupervisorpackage to allow for more customization, control and to have a more explicit ordering for users.Link to tracking issue
Fixes #39963.
Testing
Did some manual testing and ensured our current tests pass.
Documentation