Skip to content

enhancement: add support for vsock transport - #396

Open
tobz wants to merge 3 commits into
masterfrom
tobz/vsock-support
Open

tobz wants to merge 3 commits into
masterfrom
tobz/vsock-support

Conversation

@tobz

@tobz tobz commented Aug 5, 2026

Copy link
Copy Markdown
Member

Context

This PR adds experimental support for using a Vsock (VM Sockets) transport to send DogStatsD to the Datadog Agent. VM Sockets are the preferred (and, sometimes, only) transport mechanism for host-to-guest communication in Linux when dealing with virtual machines, or other adjacent use cases, like AWS Nitro Enclaves.

Support is treated as another supported scheme (vsock://) with proper parsing for common shorthand CIDs, and at the protocol level, we use the same length-delimited framing as used by UDS in stream mode. To that end, we've deduplicated a lot of the UDS streams code to be shared between the two transports.

In order to meet the Go version compatibility target, most of the lower level vsock support is built on top of x/sys/unix instead of any helper libraries. Generally speaking, though, Vsock sockets look and feel a lot like regular BSD sockets, so nothing here is particularly exotic save for the fact we have to drop down low enough to construct the socket itself... but after that, it's all "normal" APIs and methods and what have you.

@tobz
tobz requested a review from a team as a code owner August 5, 2026 15:47
@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Aug 5, 2026

Copy link
Copy Markdown

Code Coverage

🛑 Gate Violations

🎯 1 Code Coverage issue detected

A Patch coverage percentage gate may be blocking this PR.

Patch coverage: 76.11% (threshold: 90.00%)

ℹ️ Info

🎯 Code Coverage (details)
Patch Coverage: 76.11%
Overall Coverage: 84.12% (-0.58%)

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 4b93911 | Docs | Datadog PR Page | Give us feedback!

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.

1 participant