Conversation
🛑 Gate Violations
ℹ️ Info🎯 Code Coverage (details) Useful? React with 👍 / 👎 This comment will be updated automatically if new data arrives.🔗 Commit SHA: 4b93911 | Docs | Datadog PR Page | Give us feedback! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/unixinstead 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.