@@ -225,8 +225,8 @@ internal static string GetDbDependencyTarget(this AzMonList tagObjects)
225225 {
226226 string target = tagObjects . GetDependencyTarget ( PartBType . Db ) ;
227227 string dbName = AzMonList . GetTagValue ( ref tagObjects , SemanticConventions . AttributeDbName ) ? . ToString ( ) ;
228- bool isTargetEmpty = string . IsNullOrEmpty ( target ) ;
229- bool isDbNameEmpty = string . IsNullOrEmpty ( dbName ) ;
228+ bool isTargetEmpty = string . IsNullOrWhiteSpace ( target ) ;
229+ bool isDbNameEmpty = string . IsNullOrWhiteSpace ( dbName ) ;
230230 if ( ! isTargetEmpty && ! isDbNameEmpty )
231231 {
232232 target = $ "{ target } | { dbName } ";
@@ -264,7 +264,7 @@ internal static string GetDependencyTarget(this AzMonList tagObjects, PartBType
264264 }
265265
266266 var peerService = AzMonList . GetTagValue ( ref tagObjects , SemanticConventions . AttributePeerService ) ? . ToString ( ) ;
267- if ( ! string . IsNullOrEmpty ( peerService ) )
267+ if ( ! string . IsNullOrWhiteSpace ( peerService ) )
268268 {
269269 target = peerService ;
270270 return target ;
@@ -273,7 +273,7 @@ internal static string GetDependencyTarget(this AzMonList tagObjects, PartBType
273273 if ( type == PartBType . Http )
274274 {
275275 var httpHost = AzMonList . GetTagValue ( ref tagObjects , SemanticConventions . AttributeHttpHost ) ? . ToString ( ) ;
276- if ( ! string . IsNullOrEmpty ( httpHost ) )
276+ if ( ! string . IsNullOrWhiteSpace ( httpHost ) )
277277 {
278278 string portSection = $ ":{ defaultPort } ";
279279 if ( httpHost . EndsWith ( portSection , StringComparison . OrdinalIgnoreCase ) )
@@ -288,21 +288,21 @@ internal static string GetDependencyTarget(this AzMonList tagObjects, PartBType
288288 return target ;
289289 }
290290 var httpUrl = AzMonList . GetTagValue ( ref tagObjects , SemanticConventions . AttributeHttpUrl ) ? . ToString ( ) ;
291- if ( ! string . IsNullOrEmpty ( httpUrl ) && Uri . TryCreate ( httpUrl . ToString ( ) , UriKind . RelativeOrAbsolute , out var uri ) && uri . IsAbsoluteUri )
291+ if ( ! string . IsNullOrWhiteSpace ( httpUrl ) && Uri . TryCreate ( httpUrl . ToString ( ) , UriKind . RelativeOrAbsolute , out var uri ) && uri . IsAbsoluteUri )
292292 {
293293 target = uri . Authority ;
294- if ( ! string . IsNullOrEmpty ( target ) )
294+ if ( ! string . IsNullOrWhiteSpace ( target ) )
295295 {
296296 return target ;
297297 }
298298 }
299299 }
300300
301301 target = tagObjects . GetHostUsingNetPeerAttributes ( ) ;
302- if ( ! string . IsNullOrEmpty ( target ) )
302+ if ( ! string . IsNullOrWhiteSpace ( target ) )
303303 {
304304 var netPeerPort = AzMonList . GetTagValue ( ref tagObjects , SemanticConventions . AttributeNetPeerPort ) ? . ToString ( ) ;
305- if ( ! string . IsNullOrEmpty ( netPeerPort ) && netPeerPort != defaultPort )
305+ if ( ! string . IsNullOrWhiteSpace ( netPeerPort ) && netPeerPort != defaultPort )
306306 {
307307 target = $ "{ target } :{ netPeerPort } ";
308308 }
@@ -314,13 +314,13 @@ internal static string GetDependencyTarget(this AzMonList tagObjects, PartBType
314314
315315 internal static string GetHttpDependencyName ( this AzMonList tagObjects , string httpUrl )
316316 {
317- if ( string . IsNullOrEmpty ( httpUrl ) )
317+ if ( string . IsNullOrWhiteSpace ( httpUrl ) )
318318 {
319319 return null ;
320320 }
321321
322322 var httpMethod = AzMonList . GetTagValue ( ref tagObjects , SemanticConventions . AttributeHttpMethod ) ? . ToString ( ) ;
323- if ( ! string . IsNullOrEmpty ( httpMethod ) )
323+ if ( ! string . IsNullOrWhiteSpace ( httpMethod ) )
324324 {
325325 if ( Uri . TryCreate ( httpUrl . ToString ( ) , UriKind . RelativeOrAbsolute , out var uri ) && uri . IsAbsoluteUri )
326326 {
0 commit comments