consomme: improve tracing for TCP connections and DNS request handling#3424
Merged
benhillis merged 8 commits intomicrosoft:mainfrom May 6, 2026
Merged
consomme: improve tracing for TCP connections and DNS request handling#3424benhillis merged 8 commits intomicrosoft:mainfrom
benhillis merged 8 commits intomicrosoft:mainfrom
Conversation
|
This PR modifies files containing For more on why we check whole files, instead of just diffs, check out the Rustonomicon |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves debuggability of net_consomme by enriching tracing for TCP connections (adding the 4-tuple) and by introducing a per-DNS-query identifier that can be propagated into backend tracing (notably on Windows), making it easier to correlate logs in CI.
Changes:
- Include TCP source/destination socket addresses in
trace_tcp_packetoutput and add additional TCP/DNS-handler trace points. - Refactor
DnsFlowto storesrc/dstasSocketAddr(instead of IP+port fields), simplifying logging and call sites. - Add a monotonically increasing
query_idinDnsResolverand pass it into DNS backend implementations for correlation.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| vm/devices/net/net_consomme/consomme/src/udp.rs | Switch UDP DNS flow tracking to SocketAddr and update response logging/packet construction accordingly. |
| vm/devices/net/net_consomme/consomme/src/tcp.rs | Add 4-tuple to TCP packet tracing and enrich TCP/DNS-handler traces with src/dst. |
| vm/devices/net/net_consomme/consomme/src/dns_resolver/mod.rs | Refactor DnsFlow to SocketAddr and add query_id generation/plumbing through the DnsBackend trait. |
| vm/devices/net/net_consomme/consomme/src/dns_resolver/unix/mod.rs | Thread query_id into the Unix DNS backend internal request dispatch. |
| vm/devices/net/net_consomme/consomme/src/dns_resolver/windows/mod.rs | Thread query_id into Windows DNS backend, add tracing, and rename slab key tracking for pending requests. |
| vm/devices/net/net_consomme/consomme/src/dns_resolver/dns_tcp.rs | Update TCP DNS handler tracing to include src/dst and adapt to the new backend query_id parameter. |
benhillis
approved these changes
May 5, 2026
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.
Currently TCP traces do not include the four-tuple as part of the message body. This makes diagnosing TCP related issues difficult since it's impossible to associate tracing messages with the connection. DNS request handling has a similar issue, where requests do not have a unique id associated with them - making it difficult to track the request handling flow throughout consommé.
The changes in this PR should make it easier to debug issues in CI related to TCP and/or DNS.