-
Notifications
You must be signed in to change notification settings - Fork 618
Update OtlpGrpcClientOptions to populate options for gRPC client sharing #4249
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
Open
ML-dev-crypto
wants to merge
18
commits into
open-telemetry:main
Choose a base branch
from
ML-dev-crypto:fix-4239-otlp-grpc-client-options
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
e383cc8
Update OtlpGrpcClientOptions to populate options for gRPC client sharing
ML-dev-crypto 70e50e9
Add missing trailing newline (fixes -Wnewline-eof in maintainer mode)
ML-dev-crypto 424b466
Address review feedback for OtlpGrpcClientOption
ML-dev-crypto 2ca8d8e
Address remaining review feedback
ML-dev-crypto b2627ca
Export generic gRPC client environment helpers
ML-dev-crypto d703b72
Preserve shared client timeout in signal exporters
ML-dev-crypto b76e2be
Merge branch 'main' into fix-4239-otlp-grpc-client-options
dbarker adf559b
Merge branch 'main' into fix-4239-otlp-grpc-client-options
dbarker 455ba94
Merge branch 'main' into fix-4239-otlp-grpc-client-options
dbarker 4754ef4
Merge branch 'main' into fix-4239-otlp-grpc-client-options
dbarker 2a6cfdc
Merge branch 'main' into fix-4239-otlp-grpc-client-options
dbarker 7e36ff0
fix formatting
dbarker 7c2bc6d
fix iwyu warnings
dbarker 8b45712
fix clang-tidy warnings
dbarker 23935d4
cleanup
dbarker fa16125
fix iwyu warning
dbarker d62e4f1
Merge branch 'main' into fix-4239-otlp-grpc-client-options
dbarker 6dd46c0
fix iwyu warning
dbarker 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
Some comments aren't visible on the classic Files Changed page.
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
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
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
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.
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.
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.
RE: #4249 (comment)
@owent since this class now uses the same export declaration as the otlp exporter options classes that derive from it, would it be reasonable to defer any changes to those definitions to a follow up PR?
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 export/import declaration should follow the target. What I mean is:
As for OtlpGrpcClientOptions, it's fine to leave it without an export declaration — it's a header-only class with no source file. Every target that references it will compile its own copy. This only adds a bit of linker load; there's no visibility issue.
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.
That makes sense to me. Since this would be a new policy for the otlp exporter folder (and likely needed for the SDK classes as well), is it reasonable to apply the new policy in follow-up PRs?
Properly setting the export/import declarations (for all platforms and on the intended public facing classes) is something we need to address broadly throughout the project.
This PR adds the .cc file for
OtlpGrpcClientOptionsand may have prompted this discussion.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.
My suggestion is to apply it to all components. If we export symbols this way consistently across all components,
ext/src/dll/input.srcwould no longer be needed, and we could keep a uniform symbol-exporting rule across all platforms, compilers, and optimization settings — by setting the default visibility to hidden on Unix-like systems. It would also reduce linker load and speed up linking. (For example, some compiler versions may inline a symbol in Release builds but keep it "imported" in Debug builds, which leads to link errors. This issue has occurred with certain versions of protobuf.)Sorry, I missed that. Then it should use something like
OPENTELEMETRY_OTLP_GRPC_CLIENT_APIto export its symbols.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.
Applying the symbol visibility attributes to all components sounds like a nice improvement.
The grpc client class doesn't have symbol visibility attributes now so the change must be broader than this PR should take on.
Let's merge this once CI is passing and address the visibility attributes in a new PR that fixes the grpc client as well.
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.
@owent, This PR should pass CI now. Please take a review pass (your review is still requesting changes).