-
Notifications
You must be signed in to change notification settings - Fork 829
Expose some Microsoft.Extensions.Http.Diagnostics API #6747
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
base: main
Are you sure you want to change the base?
Expose some Microsoft.Extensions.Http.Diagnostics API #6747
Conversation
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 PR exposes Microsoft.Extensions.Http.Diagnostics API classes by converting internal interfaces to public abstract base classes. The changes support proposal #6737 to make HTTP diagnostics functionality available for external consumption.
- Convert internal interface-based implementations to public abstract base classes
- Replace interface references with concrete class types throughout the codebase
- Add experimental API attributes to indicate preview status
Reviewed Changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 3 comments.
File | Description |
---|---|
src/Libraries/Microsoft.Extensions.Telemetry/Http/ | Convert IHttpRouteParser/IHttpRouteFormatter interfaces to abstract base classes with public APIs |
src/Libraries/Microsoft.Extensions.Http.Diagnostics/Http/ | Convert IDownstreamDependencyMetadataManager to abstract base class and update registrations |
test/ | Update test files to use concrete types instead of interfaces |
src/Libraries/Microsoft.AspNetCore.Diagnostics.Middleware/ | Update middleware to use concrete parser/formatter types |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
test/Libraries/Microsoft.Extensions.Http.Diagnostics.Tests/Logging/HttpClientLoggerTest.cs
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.
LGTM
{ | ||
return _routeTemplateSegmentsCache.GetOrAdd(httpRoute, httpRoute => | ||
return _routeTemplateSegmentsCache.GetOrAdd(httpRoute, _ => |
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.
return _routeTemplateSegmentsCache.GetOrAdd(httpRoute, _ => | |
return _routeTemplateSegmentsCache.GetOrAdd(httpRoute, httpRoute => |
If we pass httpRoute
as a parameter rather than getting it from the closure we'll save some bytes, won't we?
this is to back up the proposal #6737
Microsoft Reviewers: Open in CodeFlow