-
Notifications
You must be signed in to change notification settings - Fork 501
[BUILD] fix build of otlp_grpc_exporter_test with modern grpc #3307
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
Closed
dbarker
wants to merge
3
commits into
open-telemetry:main
from
dbarker:fix_link_error_with_latest_grpc
+22
−34
Closed
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
gRPC client definitions are not exposed to users, so it's fine to keep the gRPC dependency private. Alternatively, we could use
PUBLIC $<BUILD_INTERFACE:gRPC::grpc++> PRIVATE $<INSTALL_INTERFACE:gRPC::grpc++>
to expose the include directories internally. Symbol conflicts don't only cause issues during compilation or linking but also will result in runtime crashes.More details can be found at #1603 , #1891 , #1998
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.
Thanks for the details and appreciate the feedback. It is definitely a challenge to get cmake linking everything under the various build configurations we have.
The feature to create and share a grpc client among exporters is a really nice one and will require users to include the grpc headers brought in by OtlpGrpcClient, which is included by the OtlpGrpcClientFactory. At the moment they would need to explicitly link in gRPC::grpc++ to their project to get those headers. I'll propose a change in a separate PR to add those headers to the install interface of the grpc client target.
Uh oh!
There was an error while loading. Please reload this page.
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.
Do you think we can move
OtlpGrpcClientReferenceGuard
out ofotlp_grpc_client.h
, so we don't need to includeotlp_grpc_client.h
in headers ofOtlpGrpcClientFactory
?I raised #3321 , could you please have a look when you have time?
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.
I think we'd need to remove all grpc from
otlp_grpc_client.h
using pmpl and some generic status codes. Alternatively we could give the client a base class and use it in the constructors of the exporters and return from the factory - then deprecate the constructors and create method with the OtlpGrpcClient shard ptr.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.
actually #3321 is a good solution as long as the client methods are accessed outside the scope of the exporters. good call.