From 2370d636d17e0422e9232962e633a80ed1ed7b3c Mon Sep 17 00:00:00 2001 From: Alan West <3676547+alanwest@users.noreply.github.com> Date: Mon, 16 Nov 2020 11:22:03 -0800 Subject: [PATCH] Use TrimStart --- .../Implementation/HttpInListener.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/HttpInListener.cs b/src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/HttpInListener.cs index e01384a2bb1..cc3424c41aa 100644 --- a/src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/HttpInListener.cs +++ b/src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/HttpInListener.cs @@ -319,7 +319,7 @@ private static void AddGrpcAttributes(Activity activity, string grpcMethod, Http // The RPC semantic conventions indicate the span name // should not have a leading forward slash. // https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/semantic_conventions/rpc.md#span-name - activity.DisplayName = grpcMethod.Trim('/'); + activity.DisplayName = grpcMethod.TrimStart('/'); activity.SetTag(SemanticConventions.AttributeRpcSystem, GrpcTagHelper.RpcSystemGrpc); activity.SetTag(SemanticConventions.AttributeNetPeerIp, context.Connection.RemoteIpAddress.ToString());