Skip to content

Commit

Permalink
Use TrimStart
Browse files Browse the repository at this point in the history
  • Loading branch information
alanwest committed Nov 16, 2020
1 parent 9a8b62a commit 2370d63
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 2370d63

Please sign in to comment.