From 20d5e0c9c2c1c1c55146eea694c3fbc574fae01f Mon Sep 17 00:00:00 2001 From: Kyle Nusbaum Date: Tue, 3 May 2022 13:34:30 -0500 Subject: [PATCH] ddtrace/tracer: clarify the configuration of dogstatsd including UDS. (#1274) --- ddtrace/tracer/option.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ddtrace/tracer/option.go b/ddtrace/tracer/option.go index 28e1f421ed..067d6a3827 100644 --- a/ddtrace/tracer/option.go +++ b/ddtrace/tracer/option.go @@ -637,9 +637,12 @@ func WithRuntimeMetrics() StartOption { } } -// WithDogstatsdAddress specifies the address to connect to for sending metrics -// to the Datadog Agent. If not set, it defaults to "localhost:8125" or to the -// combination of the environment variables DD_AGENT_HOST and DD_DOGSTATSD_PORT. +// WithDogstatsdAddress specifies the address to connect to for sending metrics to the Datadog +// Agent. It should be a "host:port" string, or the path to a unix domain socket.If not set, it +// attempts to determine the address of the statsd service according to the following rules: +// 1. Look for /var/run/datadog/dsd.socket and use it if present. IF NOT, continue to #2. +// 2. The host is determined by DD_AGENT_HOST, and defaults to "localhost" +// 3. The port is retrieved from the agent. If not present, it is determined by DD_DOGSTATSD_PORT, and defaults to 8125 // This option is in effect when WithRuntimeMetrics is enabled. func WithDogstatsdAddress(addr string) StartOption { return func(cfg *config) {