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

update Semantic Conventions: grpc attributes in aspnetcore #4660

Merged
merged 9 commits into from
Jul 17, 2023
Merged

update Semantic Conventions: grpc attributes in aspnetcore #4660

merged 9 commits into from
Jul 17, 2023

Conversation

TimothyMothra
Copy link
Contributor

Design discussion issue #4484

Changes

  • update the GRPC attributes in the AspNetCore library.
    • net.peer.ip -> client.address
    • net.peer.port -> client.port

Merge requirement checklist

  • CONTRIBUTING guidelines followed (nullable enabled, static analysis, etc.)
  • Unit tests added/updated
  • Appropriate CHANGELOG.md files updated for non-trivial changes
  • Changes in public API reviewed (if applicable)

@TimothyMothra TimothyMothra requested a review from a team July 14, 2023 22:46
@codecov
Copy link

codecov bot commented Jul 14, 2023

Codecov Report

Merging #4660 (fc975e0) into main (5715176) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4660      +/-   ##
==========================================
+ Coverage   85.01%   85.02%   +0.01%     
==========================================
  Files         314      314              
  Lines       12723    12725       +2     
==========================================
+ Hits        10817    10820       +3     
+ Misses       1906     1905       -1     
Impacted Files Coverage Δ
...tation.AspNetCore/Implementation/HttpInListener.cs 91.62% <100.00%> (+1.14%) ⬆️

... and 3 files with indirect coverage changes

@TimothyMothra

This comment was marked as resolved.

// https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/docs/http/http-spans.md
// https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/docs/database/database-spans.md
// https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/docs/rpc/rpc-spans.md
public const string AttributeClientAddress = "client.address";
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be good to add a comment saying this replaces net.peer.ip in specific cases.

public void GrpcAspNetCoreInstrumentationAddsCorrectAttributes_New(bool? enableGrpcAspNetCoreSupport)
{
var configuration = new ConfigurationBuilder()
.AddInMemoryCollection(new Dictionary<string, string> { [SemanticConventionOptInKeyName] = "http" })
Copy link
Contributor

Choose a reason for hiding this comment

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

Need not be done in this PR but the tests shouldn't be using the const string variable SemanticConventionOptInKeyName directly from src file. Our tests. would not complain about it when someone accidentally changes the value for it in the src file.

@utpilla utpilla merged commit b67ff88 into open-telemetry:main Jul 17, 2023
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.

3 participants