Skip to content

consommé: improve tcp tracing - #4177

Merged
Daman Mulye (damanm24) merged 2 commits into
microsoft:mainfrom
damanm24:improve-tcp-tracing
Sep 2, 2026
Merged

consommé: improve tcp tracing#4177
Daman Mulye (damanm24) merged 2 commits into
microsoft:mainfrom
damanm24:improve-tcp-tracing

Conversation

@damanm24

Copy link
Copy Markdown
Contributor

This PR ensures all connection traces include structured src/dst details and that TcpError(s) carry the FourTuple with the error so that the traces can be related to a specific TCP flow; thus, making debugging the tcp state machine easier.

@damanm24
Daman Mulye (damanm24) requested a review from a team as a code owner August 6, 2026 17:09
Copilot AI lite review requested due to automatic review settings August 6, 2026 17:09
@damanm24 Daman Mulye (damanm24) changed the title consommé: improve tracing consommé: improve tcp tracing Aug 6, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Note

This error may be related to your runner configuration. You can now configure runners for Copilot code review separately from Copilot cloud agent by creating a copilot-code-review.yml file with your setup steps. Read the docs for details.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Suppressed comments (1)

vm/devices/net/net_consomme/consomme/src/tcp.rs:128

  • TcpErrorKind is itself an Error, but it isn't marked as the source of TcpError, so TcpError::source() will return None and error-chain reporting will lose the underlying kind. Mark kind with #[source] to preserve the error chain while keeping the structured flow context in the top-level message.
#[error("{kind} for flow {flow}")]
pub struct TcpError {
    flow: FourTuple,
    kind: TcpErrorKind,
}

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

TcpError now carries flow information but keeps it inaccessible to other crate modules, limiting the ability to emit structured src/dst fields when errors are handled/logged outside tcp.rs.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread vm/devices/net/net_consomme/consomme/src/tcp.rs
Copilot AI review requested due to automatic review settings September 2, 2026 21:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The changes are localized to tracing/error plumbing and the updated call sites/tests appear consistent, with only a minor best-practice improvement suggested for error chaining.

Review details

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

vm/devices/net/net_consomme/consomme/src/tcp.rs:139

  • TcpError wraps the underlying reason in kind, but it isn't marked as an error source. That means std::error::Error::source() will be None and downstream error reporting loses the underlying TcpErrorKind in the error chain (even though it’s displayed). Consider marking kind as #[source] to preserve chaining while still attaching the flow.
  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@damanm24
Daman Mulye (damanm24) merged commit 70bc844 into microsoft:main Sep 2, 2026
73 checks passed
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.

3 participants