Skip to content

Commit c269c24

Browse files
committed
Apply comment
1 parent f99fde3 commit c269c24

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

tracer/src/Datadog.Trace/DiagnosticListeners/AspNetCoreDiagnosticObserver.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -544,11 +544,7 @@ private void OnRoutingEndpointMatched(object arg)
544544
tags.AspNetCoreEndpoint = routeEndpoint.Value.DisplayName;
545545
}
546546

547-
if (!routeEndpoint.Value.RoutePattern.TryDuckCast<RoutePattern>(out var routePattern))
548-
{
549-
// Failed to cast
550-
return;
551-
}
547+
var routePattern = routeEndpoint.Value.RoutePattern.DuckCast<RoutePattern>();
552548

553549
// Have to pass this value through to the MVC span, as not available there
554550
var normalizedRoute = routePattern.RawText?.ToLowerInvariant();

0 commit comments

Comments
 (0)