pkg/config/legacy: enable API to support additional legacy keys from callers#2678
pkg/config/legacy: enable API to support additional legacy keys from callers#2678gbbr wants to merge 1 commit into
Conversation
3e2ec74 to
f8fccdf
Compare
Codecov Report
@@ Coverage Diff @@
## master #2678 +/- ##
==========================================
+ Coverage 56.72% 57.06% +0.34%
==========================================
Files 380 380
Lines 24122 24148 +26
==========================================
+ Hits 13683 13780 +97
+ Misses 9524 9477 -47
+ Partials 915 891 -24
|
f8fccdf to
2779aa9
Compare
…callers This change adds a new method (`Load`) to the `legacy` package allowing callers to set further sections and keys from the Agent 5 configuration onto the new configuration by means of a callback. This is to enable agents (such as process and trace) to continue adding new entries to the old configuration without needing to modify core code.
2779aa9 to
0790c5e
Compare
|
Just to clarify: the purpose of the Its purpose is not to allow the Agent 6 to read from a So I don't see how this change would allow trace and process to support more config options in |
|
@olivielpeau understood. I will try to explain. The main idea is that we want to use the The rest of the team also plans to remove all "setters" from the config, making it read only, so it won't be possible for us to read the In the end, it should be possible for all agents to access keys from the config under the same name, regardless of where they were loaded from. I hope this clarifies more. Do you still feel that this function belongs somewhere else? We could potentially move it into |
|
Thanks for the explanation of the overall goal of the PR 👍 Just to explain where my thoughts come from:
So overall, these 2 points make me think that we should define the trace and process Now, to address the use case of the trace + process agent being able to use the Let me know what your thoughts on this are, and please discuss this with the agent guild as well. One last thing:
For infra+logs, I agree as far as we're discussing the config options that are supported since Agent v6. |
|
Great! Thanks for taking the time to clarify. I like this plan. I was wondering myself why we continue adding options to the legacy config, given that you say it's in "maintenance mode" from your team's perspective. In that case, I will make it a rule to stop adding any new options to the I assume this would be the way moving forward and is what you're also saying. |
This change adds a new function (
Load) to thelegacypackage allowingcallers to set further sections and keys from the Agent 5 configuration
onto the new configuration by means of a callback.
This is to enable agents (such as process and trace) to continue adding
new entries to the old configuration without needing to modify core
code.