Skip to content

Conversation

evgenyfedorov2
Copy link
Member

@evgenyfedorov2 evgenyfedorov2 commented Aug 26, 2025

this is to back up the proposal #6737

Microsoft Reviewers: Open in CodeFlow

@Copilot Copilot AI review requested due to automatic review settings August 26, 2025 11:19
@evgenyfedorov2 evgenyfedorov2 requested a review from a team as a code owner August 26, 2025 11:19
Copy link
Contributor

@Copilot 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 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.

Copy link
Member

@dariusclay dariusclay left a 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, _ =>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants