Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the downstream dependency metadata resolution system by introducing a new public API HttpDependencyMetadataResolver to replace the internal IDownstreamDependencyMetadataManager interface. The changes expose the dependency metadata resolution functionality with improved naming and flexibility.
- Renames internal
DownstreamDependencyMetadataManagerto publicHttpDependencyMetadataResolveras an abstract class - Adds
DefaultHttpDependencyMetadataResolveras the default implementation - Updates registration methods to use
TryAddEnumerablefor proper DI behavior with multiple metadata instances
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| HttpDependencyMetadataResolver.cs | Converts internal sealed class to public abstract class with documentation and removes obsolete HttpWebRequest support |
| DefaultHttpDependencyMetadataResolver.cs | New sealed class providing default implementation of the resolver |
| HttpDiagnosticsServiceCollectionExtensions.cs | Updates registration to use TryAddEnumerable and adds new AddStandardHttpDependencyMetadataResolver method |
| HttpRequestReader.cs | Updates field and parameter names to use new resolver type |
| IDownstreamDependencyMetadataManager.cs | Marks internal interface as obsolete |
| DownstreamDependencyMetadataManagerTests.cs | Updates test class to use new resolver type and namespace |
src/Libraries/Microsoft.Extensions.Http.Diagnostics/Http/HttpDependencyMetadataResolver.cs
Show resolved
Hide resolved
...ies/Microsoft.Extensions.Http.Diagnostics/Http/HttpDiagnosticsServiceCollectionExtensions.cs
Outdated
Show resolved
Hide resolved
...ies/Microsoft.Extensions.Http.Diagnostics/Http/HttpDiagnosticsServiceCollectionExtensions.cs
Outdated
Show resolved
Hide resolved
dariusclay
reviewed
Oct 29, 2025
...ies/Microsoft.Extensions.Http.Diagnostics/Http/HttpDiagnosticsServiceCollectionExtensions.cs
Show resolved
Hide resolved
evgenyfedorov2
requested changes
Oct 29, 2025
src/Libraries/Microsoft.Extensions.Http.Diagnostics/Http/HttpDependencyMetadataResolver.cs
Show resolved
Hide resolved
src/Libraries/Microsoft.Extensions.Http.Diagnostics/Http/HttpDependencyMetadataResolver.cs
Outdated
Show resolved
Hide resolved
...crosoft.Extensions.Http.Diagnostics/Logging/Internal/IDownstreamDependencyMetadataManager.cs
Outdated
Show resolved
Hide resolved
...ibraries/Microsoft.Extensions.Http.Diagnostics/Http/DefaultHttpDependencyMetadataResolver.cs
Outdated
Show resolved
Hide resolved
...ies/Microsoft.Extensions.Http.Diagnostics/Http/HttpDiagnosticsServiceCollectionExtensions.cs
Show resolved
Hide resolved
evgenyfedorov2
approved these changes
Nov 3, 2025
...ibraries/Microsoft.Extensions.Http.Diagnostics/Http/DefaultHttpDependencyMetadataResolver.cs
Outdated
Show resolved
Hide resolved
dariusclay
approved these changes
Nov 3, 2025
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.
As per following API proposal, this PR exposes the
DownstreamDependencyMetadataManagerclass with the new name that allows you to configure the downstream dependency metadata resolution and brings more flexibility into the flowMicrosoft Reviewers: Open in CodeFlow