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

Add grpc instrumentation with experimental feature flag #5130

Conversation

vishweshbankwar
Copy link
Member

@vishweshbankwar vishweshbankwar commented Dec 5, 2023

Fixes #
Design discussion issue #

Changes

Please provide a brief description of the changes here.

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)

Copy link

codecov bot commented Dec 5, 2023

Codecov Report

Merging #5130 (9c9f20d) into main (ff39563) will increase coverage by 0.27%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5130      +/-   ##
==========================================
+ Coverage   83.05%   83.32%   +0.27%     
==========================================
  Files         297      297              
  Lines       12369    12380      +11     
==========================================
+ Hits        10273    10316      +43     
+ Misses       2096     2064      -32     
Flag Coverage Δ
unittests 83.32% <100.00%> (+0.27%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...spNetCore/AspNetCoreTraceInstrumentationOptions.cs 100.00% <100.00%> (ø)
...tation.AspNetCore/Implementation/HttpInListener.cs 88.88% <100.00%> (+13.70%) ⬆️
...tion.AspNetCore/TracerProviderBuilderExtensions.cs 100.00% <100.00%> (ø)

... and 7 files with indirect coverage changes

@martinjt
Copy link
Member

martinjt commented Dec 5, 2023

Great step forward, and honestly I think this might be a really good approach in general for other changes.

@martinjt
Copy link
Member

martinjt commented Dec 5, 2023

One note I have is that this should also apply to the .HTTP client right?

@vishweshbankwar
Copy link
Member Author

One note I have is that this should also apply to the .HTTP client right?

For grpc client, there is a separate instrumentation library. https://github.com/open-telemetry/opentelemetry-dotnet/tree/main/src/OpenTelemetry.Instrumentation.GrpcNetClient

@vishweshbankwar vishweshbankwar marked this pull request as ready for review December 6, 2023 01:10
@vishweshbankwar vishweshbankwar requested a review from a team December 6, 2023 01:10
Copy link
Member

@CodeBlanch CodeBlanch left a comment

Choose a reason for hiding this comment

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

LGTM

[InlineData("false")]
[InlineData("True")]
[InlineData("False")]
public void GrpcAspNetCoreInstrumentationAddsCorrectAttributesWhenItCreatesNewActivity(string enableGrpcAspNetCoreSupport)
Copy link
Contributor

Choose a reason for hiding this comment

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

Not related to this PR but these tests should be moved to OpenTelemetry.Instrumentation.AspNetCore.Tests.

@utpilla utpilla merged commit 58e8f24 into open-telemetry:main Dec 7, 2023
78 checks passed
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.

6 participants