Skip to content

feat(config): unix socket detection#204

Merged
iunanua merged 4 commits intomainfrom
igor/unix-socket-detection
Apr 30, 2026
Merged

feat(config): unix socket detection#204
iunanua merged 4 commits intomainfrom
igor/unix-socket-detection

Conversation

@iunanua
Copy link
Copy Markdown
Collaborator

@iunanua iunanua commented Apr 1, 2026

What does this PR do?

  • If trace_agent_url is empty and if user hasn't provided agent_host nor agent_port and UDS is alive, use /var/run/datadog/apm.socket as agent_url and /var/run/datadog/dsd.socket as dogstatsd url.
  • Change remote config client to support UDS

Extra

TelemetryWorkerBuilder could be using the wrong host.

@iunanua iunanua force-pushed the igor/unix-socket-detection branch from 90a9c5f to fdd21e4 Compare April 17, 2026 12:02
@iunanua iunanua marked this pull request as ready for review April 17, 2026 13:26
@iunanua iunanua requested a review from a team as a code owner April 17, 2026 13:26
if custom_handle.is_none() {
let mut builder = worker::TelemetryWorkerBuilder::new(
config.trace_agent_url().to_string(),
let mut builder = worker::TelemetryWorkerBuilder::new_fetch_host(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cause it might be wrong since the beginning. We were initializing the builder with trace_agent_url as the host.

But TelemetryWorkerBuilder::new_fetch_host infers the host based on data from the real host (hostname, container id, etc) https://github.com/DataDog/libdatadog/blob/main/libdd-telemetry/src/lib.rs#L22

@iunanua iunanua merged commit 37031f1 into main Apr 30, 2026
34 checks passed
@iunanua iunanua deleted the igor/unix-socket-detection branch April 30, 2026 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants