Add measures and tags with mediator object to the HttpClientLatencyLogEnricher#6783
Merged
evgenyfedorov2 merged 21 commits intomainfrom Sep 25, 2025
Merged
Add measures and tags with mediator object to the HttpClientLatencyLogEnricher#6783evgenyfedorov2 merged 21 commits intomainfrom
evgenyfedorov2 merged 21 commits intomainfrom
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
Contributor
There was a problem hiding this comment.
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
HttpLatencyMediatorclass with platform-specific implementations for .NET and .NET Framework - Introduces
HttpMeasuresandHttpTagsclasses 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
Member
This was referenced Oct 22, 2025
Closed
Merged
Merged
Closed
Closed
Closed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Microsoft Reviewers: Open in CodeFlow