[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. |
marcalff
left a comment
There was a problem hiding this comment.
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
OtlpGrpcClientFactoryFor significant contributions please make sure you have completed the following items:
CHANGELOG.mdupdated for non-trivial changes