Class: Datadog::Core::Configuration::AgentlessSettingsResolver

Inherits:
AgentSettingsResolver show all
Defined in:
lib/datadog/core/configuration/agentless_settings_resolver.rb

Overview

Agent settings resolver for agentless operations (currently, telemetry in agentless mode).

The terminology gets a little confusing here, but transports communicate with servers which are - for most components in the tracer - the (local) agent. Hence, “agent settings” to refer to where the server is located. Telemetry supports sending to the local agent but also implements agentless mode where it sends directly to Datadog intake endpoints. The agentless mode is configured using different settings, and this class produces AgentSettings instances when in agentless mode.

Agentless settings resolver uses the following configuration sources:

  1. url_override constructor parameter, if provided

  2. Built-in default host/port/TLS settings for the backend intake endpoint

The agentless resolver does NOT use agent settings (since it is for agentless operation), specifically it ignores:

  • c.agent.host

  • DD_AGENT_HOST

  • c.agent.port

  • DD_AGENT_PORT

However, agentless resolver does respect the timeout specified via c.agent.timeout_seconds or DD_TRACE_AGENT_TIMEOUT_SECONDS.

Constant Summary

Constants inherited from AgentSettingsResolver

Datadog::Core::Configuration::AgentSettingsResolver::IPV6_REGEXP

Class Method Summary collapse

Class Method Details

.call(settings, host_prefix:, url_override: nil, url_override_source: nil, logger: Datadog.logger) ⇒ Object

To avoid coupling this class to telemetry, the URL override is taken here as a parameter instead of being read out of c.telemetry.agentless_url_override. For the same reason, the url_override_source parameter should be set to the string “c.telemetry.agentless_url_override”.



45
46
47
48
49
50
51
52
53
# File 'lib/datadog/core/configuration/agentless_settings_resolver.rb', line 45

def self.call(settings, host_prefix:, url_override: nil, url_override_source: nil, logger: Datadog.logger)
  new(
    settings,
    host_prefix: host_prefix,
    url_override: url_override,
    url_override_source: url_override_source,
    logger: logger
  ).send(:call)
end