-
Notifications
You must be signed in to change notification settings - Fork 483
[BUILD] Remove gRPC header including in OtlpGrpcClientFactory
.
#3321
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
[BUILD] Remove gRPC header including in OtlpGrpcClientFactory
.
#3321
Conversation
✅ Deploy Preview for opentelemetry-cpp-api-docs canceled.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3321 +/- ##
==========================================
+ Coverage 89.51% 89.52% +0.02%
==========================================
Files 210 210
Lines 6526 6526
==========================================
+ Hits 5841 5842 +1
+ Misses 685 684 -1 🚀 New features to boost your workflow:
|
Looks good to me. Can the methods of the grpc client be protected? |
To prevent the inclusion of gRPC headers in the future, I added macro checks to the factory unit test code. Since gRPC client methods must be used in OTLP gRPC exporters, making them protected would require numerous friend classes for exporters and unit tests, which would hinder maintainability. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The factory returns std::shared_ptr<OtlpGrpcClient>
, so I think the user code will still need to see the destructor of OtlpGrpcClient
at some point.
The header file for OtlpGrpcClient
might need additional cleanup.
In any case, this change in the client factory is needed, so approving this PR.
OtlpGrpcClientFactory
.OtlpGrpcClientFactory
.
A note in |
Fixes #3320
Changes
OtlpGrpcClientFactory
For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes