Repository navigation
[dotnet] Correlate low level http requests/responses and log failures - #17074
Conversation
PR TypeEnhancement Description
|
| Relevant files | |||
|---|---|---|---|
| Enhancement |
|
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||
There was a problem hiding this comment.
Pull request overview
This PR improves trace-level diagnostics in the .NET HttpCommandExecutor transport by adding a correlation identifier to link each low-level HTTP request log to its corresponding response (and to trace exceptions during send).
Changes:
- Add a
requestIdand include it in trace logs for outgoing HTTP requests and incoming HTTP responses. - Wrap the HTTP send in a try/catch to trace exceptions (including
requestId) before rethrowing.
requestId(derived from the request's hash code), which is included in both request and response log messages for easier correlation.Error handling enhancements:
requestIdand exception details is recorded before rethrowing the exception.🔗 Related Issues
Contribute to #17053
🔄 Types of changes