Skip to content

Unix domain socket support#68

Merged
vitor-de-araujo merged 6 commits intomainfrom
vitor-de-araujo/SDTEST-2660/unix-domain-sockets
Nov 19, 2025
Merged

Unix domain socket support#68
vitor-de-araujo merged 6 commits intomainfrom
vitor-de-araujo/SDTEST-2660/unix-domain-sockets

Conversation

@vitor-de-araujo
Copy link
Contributor

@vitor-de-araujo vitor-de-araujo commented Nov 19, 2025

Add support for talking to the agent via Unix domain socket.

Add logic for deciding whether to use the Unix domain socket, based on https://github.com/DataDog/dd-trace-py/blob/4.0/ddtrace/internal/settings/_agent.py#L32 . Basically:

  • If the full tracer agent URL is specified explicitly by the user, we use that;
  • If the full URL is not specified, but the hostname or port is, we construct a full HTTP url from them;
  • If neither is specified, and /var/run/datadog/apm.socket exists, we use that;
  • Otherwise, we default to http://localhost:8126.

Previously, for EVP proxy mode, we would pass the EVP base path as part of the URL (i.e., BackendConnector(url="http://localhost:8126/evp_proxy/v4"), but this does not work for unix:// URLs because the base path in the URL is the filename. To solve this, we allow passing an explicit base_path parameter to BackendConnector (e.g., BackendConnector(url="unix:///var/run/datadog/apm.socket", base_path="/evp_proxy/v4")).

@vitor-de-araujo vitor-de-araujo marked this pull request as ready for review November 19, 2025 11:56
@vitor-de-araujo vitor-de-araujo requested a review from a team as a code owner November 19, 2025 11:56
@vitor-de-araujo vitor-de-araujo merged commit 4d9ecb8 into main Nov 19, 2025
16 checks passed
@vitor-de-araujo vitor-de-araujo deleted the vitor-de-araujo/SDTEST-2660/unix-domain-sockets branch November 19, 2025 12:01
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