@@ -73,15 +73,6 @@ protected HttpMetricsTestBase(ITestOutputHelper output) : base(output)
7373 }
7474
7575
76- private static void VerifyPeerAddress ( KeyValuePair < string , object ? > [ ] tags , IPAddress [ ] validPeerAddresses = null )
77- {
78- string ipString = ( string ) tags . Single ( t => t . Key == "network.peer.address" ) . Value ;
79- validPeerAddresses ??= [ IPAddress . Loopback . MapToIPv6 ( ) , IPAddress . Loopback , IPAddress . IPv6Loopback ] ;
80- IPAddress ip = IPAddress . Parse ( ipString ) ;
81- Assert . Contains ( ip , validPeerAddresses ) ;
82- }
83-
84-
8576 protected static void VerifyRequestDuration ( Measurement < double > measurement ,
8677 Uri uri ,
8778 Version ? protocolVersion = null ,
@@ -127,14 +118,13 @@ protected static void VerifyActiveRequests(string instrumentName, long measureme
127118 Assert . Equal ( method , tags . Single ( t => t . Key == "http.request.method" ) . Value ) ;
128119 }
129120
130- protected static void VerifyOpenConnections ( string actualName , object measurement , KeyValuePair < string , object ? > [ ] tags , long expectedValue , Uri uri , Version ? protocolVersion , string state , IPAddress [ ] validPeerAddresses = null )
121+ protected static void VerifyOpenConnections ( string actualName , object measurement , KeyValuePair < string , object ? > [ ] tags , long expectedValue , Uri uri , Version ? protocolVersion , string state )
131122 {
132123 Assert . Equal ( InstrumentNames . OpenConnections , actualName ) ;
133124 Assert . Equal ( expectedValue , Assert . IsType < long > ( measurement ) ) ;
134125 VerifySchemeHostPortTags ( tags , uri ) ;
135126 VerifyTag ( tags , "network.protocol.version" , GetVersionString ( protocolVersion ) ) ;
136127 VerifyTag ( tags , "http.connection.state" , state ) ;
137- VerifyPeerAddress ( tags , validPeerAddresses ) ;
138128 }
139129
140130 protected static void VerifyConnectionDuration ( string instrumentName , object measurement , KeyValuePair < string , object ? > [ ] tags , Uri uri , Version ? protocolVersion , IPAddress [ ] validPeerAddresses = null )
@@ -149,7 +139,6 @@ protected static void VerifyConnectionDuration(string instrumentName, object mea
149139 }
150140 VerifySchemeHostPortTags ( tags , uri ) ;
151141 VerifyTag ( tags , "network.protocol.version" , GetVersionString ( protocolVersion ) ) ;
152- VerifyPeerAddress ( tags , validPeerAddresses ) ;
153142 }
154143
155144 protected static void VerifyTimeInQueue ( string instrumentName , object measurement , KeyValuePair < string , object ? > [ ] tags , Uri uri , Version ? protocolVersion , string method = "GET" )
@@ -400,7 +389,7 @@ public async Task ExternalServer_DurationMetrics_Recorded()
400389 Measurement < double > cd = Assert . Single ( connectionDurationRecorder . GetMeasurements ( ) ) ;
401390 VerifyConnectionDuration ( InstrumentNames . ConnectionDuration , cd . Value , cd . Tags . ToArray ( ) , uri , UseVersion , addresses ) ;
402391 Measurement < long > oc = openConnectionsRecorder . GetMeasurements ( ) . First ( ) ;
403- VerifyOpenConnections ( InstrumentNames . OpenConnections , oc . Value , oc . Tags . ToArray ( ) , 1 , uri , UseVersion , "idle" , addresses ) ;
392+ VerifyOpenConnections ( InstrumentNames . OpenConnections , oc . Value , oc . Tags . ToArray ( ) , 1 , uri , UseVersion , "idle" ) ;
404393 }
405394
406395 [ ConditionalFact ( typeof ( RemoteExecutor ) , nameof ( RemoteExecutor . IsSupported ) ) ]
0 commit comments