-
Notifications
You must be signed in to change notification settings - Fork 832
Add measures and tags with mediator object to the HttpClientLatencyLogEnricher #6783
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
...aries/Microsoft.Extensions.Http.Diagnostics/Latency/Internal/HttpClientLatencyLogEnricher.cs
Show resolved
Hide resolved
...aries/Microsoft.Extensions.Http.Diagnostics/Latency/Internal/HttpClientLatencyLogEnricher.cs
Outdated
Show resolved
Hide resolved
...raries/Microsoft.Extensions.Http.Diagnostics/Latency/HttpClientLatencyTelemetryExtensions.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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 pull request introduces a new HttpLatencyMediator
object to enhance HTTP client latency telemetry by adding measures and tags recording capabilities. The mediator provides a centralized way to record GC pause time measurements and HTTP version tags during HTTP request processing.
Key changes:
- Adds
HttpLatencyMediator
class with platform-specific implementations for .NET and .NET Framework - Introduces
HttpMeasures
andHttpTags
classes to define metric names and tag names - Updates the log enricher to include tags and measures in the output format with versioned schema
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
HttpLatencyMediator.cs |
New mediator class for .NET that records GC pause time measures and HTTP version tags |
HttpLatencyMediator.netfx.cs |
.NET Framework version of the mediator with limited functionality (tags only) |
HttpMeasures.cs |
Defines HTTP-related measure names including GC pause time |
HttpTags.cs |
Defines HTTP-related tag names including HTTP version |
HttpLatencyTelemetryHandler.cs |
Updated to accept and use the mediator for recording start metrics |
HttpClientLatencyLogEnricher.cs |
Enhanced to use mediator and include tags/measures in enriched log output |
HttpClientLatencyTelemetryExtensions.cs |
Registers the mediator and measure/tag names with DI container |
Test files | Updated to include mediator parameter in constructor calls and added comprehensive tests |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
...ies/Microsoft.Extensions.Http.Diagnostics.Tests/Latency/Internal/HttpLatencyMediatorTests.cs
Show resolved
Hide resolved
...aries/Microsoft.Extensions.Http.Diagnostics/Latency/Internal/HttpClientLatencyLogEnricher.cs
Show resolved
Hide resolved
LGTM |
# Conflicts: # src/Libraries/Microsoft.Extensions.Http.Diagnostics/Latency/Internal/HttpRequestLatencyListener.cs
Microsoft Reviewers: Open in CodeFlow