-
Notifications
You must be signed in to change notification settings - Fork 375
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
Add #add to configuration resolver #940
Conversation
b8b40c6
to
05e68a6
Compare
@@ -9,6 +9,16 @@ module Configuration | |||
class Resolver < Contrib::Configuration::Resolver | |||
def initialize(configurations = nil) | |||
@configurations = configurations | |||
@well_known_keys = {} |
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.
This may be renamed to @resolved_keys
.
Would you see any interest in using concurrent ruby data structures here?
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.
I like that name; I'll update, thanks!
As much as we'd like to, we can't use any libraries (including concurrent-ruby
) as they may conflict with user's own copies of these gems. However if you have a custom resolver in your own application or integration, you're welcome to use it.
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.
👍
05e68a6
to
4eb3ec8
Compare
Did some refactoring to |
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.
To support the expansion of "multiplexing" (having multiple configurations per integration) and its applications in #882 and #861/#937, this pull request refactors the
Datadog::Contrib::Configuration::Resolver
and adds an#add
function to it, to allow for certain use cases to operate more efficiently. See linked issues/PRs for example cases.This was originally a change introduced in #882 by @stormsilver, but extracted it out as a base for other PRs as well.