Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conform gRPC span name to spec #1551

Merged
merged 3 commits into from
Nov 16, 2020

Conversation

alanwest
Copy link
Member

Fixes #.

Changes

Please provide a brief description of the changes here.

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Design discussion issue #
  • Changes in public API reviewed

@alanwest alanwest requested a review from a team as a code owner November 16, 2020 19:14
// 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('/');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TrimStart might be slightly faster (if we're only concerned with the leading character).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. Trimming only leading character should be ok in this context since grpcMethod is really just derived from the HttpContext.Request.Path.

@codecov
Copy link

codecov bot commented Nov 16, 2020

Codecov Report

Merging #1551 (2370d63) into master (a944d94) will decrease coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1551      +/-   ##
==========================================
- Coverage   80.99%   80.93%   -0.06%     
==========================================
  Files         236      236              
  Lines        6425     6426       +1     
==========================================
- Hits         5204     5201       -3     
- Misses       1221     1225       +4     
Impacted Files Coverage Δ
...tation.AspNetCore/Implementation/HttpInListener.cs 86.66% <100.00%> (+0.09%) ⬆️
...lemetry/Internal/SelfDiagnosticsConfigRefresher.cs 18.07% <0.00%> (-3.62%) ⬇️
...ter.ZPages/Implementation/ZPagesActivityTracker.cs 97.14% <0.00%> (-2.86%) ⬇️

@cijothomas cijothomas merged commit d958505 into open-telemetry:master Nov 16, 2020
@alanwest alanwest deleted the alanwest/grpc-span-name branch March 9, 2021 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants