-
Notifications
You must be signed in to change notification settings - Fork 694
Support uninstrumented peer visualization for parameters, and resources with connection strings and github models #10340
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
…n strings, and GitHub models Co-authored-by: davidfowl <[email protected]>
Co-authored-by: davidfowl <[email protected]>
Co-authored-by: davidfowl <[email protected]>
Co-authored-by: davidfowl <[email protected]>
@copilot ConnectionStringParserTests has some failing tests |
…ction Co-authored-by: JamesNK <[email protected]>
@copilot Cache the resource addresses on the type. Recompute them when resource changes are detected. |
…omputation on each peer resolution Co-authored-by: davidfowl <[email protected]>
Implemented caching of resource addresses on the ResourceOutgoingPeerResolver type. The cache is automatically updated when peer-relevant changes are detected, eliminating the performance overhead of repeated address extraction on each peer resolution. Commit d0c1afb. |
We want the cache on the ResourceViewModel |
Co-authored-by: davidfowl <[email protected]>
Moved the cache to ResourceViewModel as requested. Each ResourceViewModel now has a |
/backport to release/9.4 |
Started backporting to release/9.4: https://github.com/dotnet/aspire/actions/runs/16268754388 |
Overview
Extends the uninstrumented peer visualization mechanism in Aspire 9.3 to support parameters, connection strings, and GitHub models resources. Previously, outgoing calls from these resource types to uninstrumented peers did not appear as referenced peers in the trace timeline.
Implementation
Extended
ResourceOutgoingPeerResolver.TryResolvePeerNameCore
to support peer resolution beyond just URL properties:1. Connection String Support
resource.connectionString
property forEndpoint=
patternsmodels.github.ai:443
for peer matching2. Parameter Value Support
Value
property of Parameter resourceshttps://api.example.com:8080/endpoint
→api.example.com:8080
3. Consistent Address Matching
Key Functions Added
TryExtractEndpointFromConnectionString
: Parses connection strings for Endpoint= patterns and extracts host:portTryParseUrlHostAndPort
: Extracts host:port from URLs in parameter valuesDoesAddressMatch
: Applies address transformations for consistent matching with existing logicTesting
Added comprehensive unit tests covering:
Impact
This enables full trace visualization for outgoing calls from parameters, connection strings, and GitHub models resources to uninstrumented peers. The trace UI experience now matches the behavior for all supported resource types, providing complete visibility over dependency chains regardless of resource instrumentation status.
Fixes #10338.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.