Class: Datadog::Core::Configuration::AgentSettingsResolver
- Inherits:
-
Object
- Object
- Datadog::Core::Configuration::AgentSettingsResolver
- Defined in:
- lib/datadog/core/configuration/agent_settings_resolver.rb
Overview
This class unifies all the different ways that users can configure how we talk to the agent.
It has quite a lot of complexity, but this complexity just reflects the actual complexity we have around our configuration today. E.g., this is just all of the complexity regarding agent settings gathered together in a single place. As we deprecate more and more of the different ways that these things can be configured, this class will reflect that simplification as well.
Whenever there is a conflict (different configurations are provided in different orders), it MUST warn the users about it and pick a value based on the following priority: code > environment variable > defaults.
Defined Under Namespace
Classes: AgentSettings
Constant Summary collapse
- IPV6_REGEXP =
IPv6 regular expression from stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses Does not match IPv4 addresses.
/\A(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\z)/.freeze
Class Method Summary collapse
Class Method Details
.call(settings, logger: Datadog.logger) ⇒ Object
65 66 67 |
# File 'lib/datadog/core/configuration/agent_settings_resolver.rb', line 65 def self.call(settings, logger: Datadog.logger) new(settings, logger: logger).send(:call) end |