@@ -144,35 +144,10 @@ private static bool ArePropertyValuesEquivalent(ResourceViewModel resource1, Res
144144
145145 public bool TryResolvePeer ( KeyValuePair < string , string > [ ] attributes , out string ? name , out ResourceViewModel ? matchedResource )
146146 {
147- var address = OtlpHelpers . GetPeerAddress ( attributes ) ;
148- if ( address != null )
149- {
150- // Apply transformers to the peer address cumulatively
151- var transformedAddress = address ;
152-
153- // First check exact match
154- if ( TryMatchAgainstResources ( transformedAddress , _resourceByName , out name , out matchedResource ) )
155- {
156- return true ;
157- }
158-
159- // Then apply each transformer cumulatively and check
160- foreach ( var transformer in s_addressTransformers )
161- {
162- transformedAddress = transformer ( transformedAddress ) ;
163- if ( TryMatchAgainstResources ( transformedAddress , _resourceByName , out name , out matchedResource ) )
164- {
165- return true ;
166- }
167- }
168- }
169-
170- name = null ;
171- matchedResource = null ;
172- return false ;
147+ return TryResolvePeerCore ( _resourceByName , attributes , out name , out matchedResource ) ;
173148 }
174149
175- internal static bool TryResolvePeerNameCore ( IDictionary < string , ResourceViewModel > resources , KeyValuePair < string , string > [ ] attributes , [ NotNullWhen ( true ) ] out string ? name , [ NotNullWhen ( true ) ] out ResourceViewModel ? resourceMatch )
150+ internal static bool TryResolvePeerCore ( IDictionary < string , ResourceViewModel > resources , KeyValuePair < string , string > [ ] attributes , [ NotNullWhen ( true ) ] out string ? name , [ NotNullWhen ( true ) ] out ResourceViewModel ? resourceMatch )
176151 {
177152 var address = OtlpHelpers . GetPeerAddress ( attributes ) ;
178153 if ( address != null )
0 commit comments