Skip to content

Conversation

@englishm
Copy link
Member

@englishm englishm commented Nov 7, 2025

Adds a mechanism for correlating user-facing errors to more detailed internal logs with additional context.

@englishm englishm requested a review from Copilot November 7, 2025 22:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances error reporting in the MoQ transport layer by introducing correlation IDs and contextual logging for errors. The changes replace basic error variants (NotFound, Internal, NotImplemented) with new variants that include UUID-based correlation IDs and detailed context messages to facilitate debugging in production.

Key changes:

  • Added new error variants with UUID correlation IDs (NotFoundWithId, InternalWithId, NotImplementedWithId)
  • Created helper methods (not_found_ctx, internal_ctx, not_implemented_ctx) that generate correlation IDs and log context with file location
  • Replaced manual error logging followed by basic error returns with single calls to the new helper methods

Reviewed Changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
moq-transport/src/serve/error.rs Added three new error variants with UUID correlation IDs and helper methods for creating contextualized errors with automatic logging
moq-transport/src/session/error.rs Updated unimplemented() and From<SessionError> to use new contextualized error helper methods
moq-transport/src/session/subscriber.rs Replaced manual error logging with calls to new error helper methods for not-found and internal errors
moq-transport/src/session/publisher.rs Updated subscription and track status error handling to use contextualized error methods
moq-transport/src/session/announce.rs Updated AnnounceState drop handler to use contextualized error method
moq-transport/src/serve/tracks.rs Updated TracksRequest drop handler to use contextualized error method
moq-relay-ietf/src/producer.rs Updated subscribe and track_status error handling to use contextualized error methods
moq-transport/Cargo.toml Added uuid dependency with v4 feature
Cargo.lock Locked uuid dependency at version 1.18.1

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Establish patterns for sending errors with correlation ids that can be
mapped to logs, the same with additional logged information, and the
same with custom user-facing reason phrases.
@englishm englishm requested a review from Copilot November 7, 2025 23:38
Copy link
Contributor

Copilot AI left a comment

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 8 out of 9 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@englishm englishm marked this pull request as ready for review November 7, 2025 23:45
@englishm englishm merged commit 36d7cc1 into main Nov 7, 2025
10 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.

1 participant