Tracer Version(s)
5.8.2
Go Version(s)
1.26.0
Bug Report
DD_DOGSTATSD_PORT env var gets ignored & overwritten by the reported port from the agent status http call. At my company, we have differenttexposed port 8215 v internal port 8125. Setting DD_DOGSTATSD_PORT=8215 is ignored in option.go function resolveDogstatsdAddr :
// use agent-reported address if it differs from the user-defined TCP-based protocol URI
// we have a valid host:port address; replace the port because the agent knows better
addr = net.JoinHostPort(host, strconv.Itoa(agentport))
We need a way to use the actual port that is configured via the env var. the java dd library allows this. the agent doesnt alwasy know better :)
Reproduction Code
n/a
Error Logs
n/a
Go Env Output
AR='ar' CC='clang' CGO_CFLAGS='-O2 -g' CGO_CPPFLAGS='' CGO_CXXFLAGS='-O2 -g' CGO_ENABLED='1' CGO_FFLAGS='-O2 -g' CGO_LDFLAGS='-O2 -g' CXX='clang++' GCCGO='gccgo' GO111MODULE='on' GOARCH='arm64' GOARM64='v8.0' GOAUTH='netrc' GOBIN='' GOCACHE='/Users/mk028p/Library/Caches/go-build' GOCACHEPROG='' GODEBUG='' GOENV='/Users/mk028p/Library/Application Support/go/env' GOEXE='' GOEXPERIMENT='' GOFIPS140='off' GOFLAGS='' GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/yj/_m20ncq537v5t_80m98d1v080000gp/T/go-build1250627678=/tmp/go-build -gno-record-gcc-switches -fno-common' GOHOSTARCH='arm64' GOHOSTOS='darwin' GOINSECURE='' GOMOD='/Users/mk028p/Code/feeds/sps-cdf2-apis/go.mod' GOMODCACHE='/Users/mk028p/go/pkg/mod' GONOPROXY='github.com/wayfair-shared/' GONOSUMDB='github.com/wayfair-shared/' GOOS='darwin' GOPATH='/Users/mk028p/go' GOPRIVATE='github.com/wayfair-shared/*' GOPROXY='https://proxy.golang.org,direct' GOROOT='/Users/mk028p/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.26.0.darwin-arm64' GOSUMDB='sum.golang.org' GOTELEMETRY='local' GOTELEMETRYDIR='/Users/mk028p/Library/Application Support/go/telemetry' GOTMPDIR='' GOTOOLCHAIN='auto' GOTOOLDIR='/Users/mk028p/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.26.0.darwin-arm64/pkg/tool/darwin_arm64' GOVCS='' GOVERSION='go1.26.0' GOWORK='' PKG_CONFIG='pkg-config' (base) mk028p@ALT08070 sps-cdf2-apis %
Tracer Version(s)
5.8.2
Go Version(s)
1.26.0
Bug Report
DD_DOGSTATSD_PORT env var gets ignored & overwritten by the reported port from the agent status http call. At my company, we have differenttexposed port 8215 v internal port 8125. Setting DD_DOGSTATSD_PORT=8215 is ignored in option.go function resolveDogstatsdAddr :
We need a way to use the actual port that is configured via the env var. the java dd library allows this. the agent doesnt alwasy know better :)
Reproduction Code
n/a
Error Logs
n/a
Go Env Output
AR='ar' CC='clang' CGO_CFLAGS='-O2 -g' CGO_CPPFLAGS='' CGO_CXXFLAGS='-O2 -g' CGO_ENABLED='1' CGO_FFLAGS='-O2 -g' CGO_LDFLAGS='-O2 -g' CXX='clang++' GCCGO='gccgo' GO111MODULE='on' GOARCH='arm64' GOARM64='v8.0' GOAUTH='netrc' GOBIN='' GOCACHE='/Users/mk028p/Library/Caches/go-build' GOCACHEPROG='' GODEBUG='' GOENV='/Users/mk028p/Library/Application Support/go/env' GOEXE='' GOEXPERIMENT='' GOFIPS140='off' GOFLAGS='' GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/yj/_m20ncq537v5t_80m98d1v080000gp/T/go-build1250627678=/tmp/go-build -gno-record-gcc-switches -fno-common' GOHOSTARCH='arm64' GOHOSTOS='darwin' GOINSECURE='' GOMOD='/Users/mk028p/Code/feeds/sps-cdf2-apis/go.mod' GOMODCACHE='/Users/mk028p/go/pkg/mod' GONOPROXY='github.com/wayfair-shared/' GONOSUMDB='github.com/wayfair-shared/' GOOS='darwin' GOPATH='/Users/mk028p/go' GOPRIVATE='github.com/wayfair-shared/*' GOPROXY='https://proxy.golang.org,direct' GOROOT='/Users/mk028p/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.26.0.darwin-arm64' GOSUMDB='sum.golang.org' GOTELEMETRY='local' GOTELEMETRYDIR='/Users/mk028p/Library/Application Support/go/telemetry' GOTMPDIR='' GOTOOLCHAIN='auto' GOTOOLDIR='/Users/mk028p/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.26.0.darwin-arm64/pkg/tool/darwin_arm64' GOVCS='' GOVERSION='go1.26.0' GOWORK='' PKG_CONFIG='pkg-config' (base) mk028p@ALT08070 sps-cdf2-apis %