Repository navigation
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
21
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
21 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 6177395
Merge branch 'main' into fix-4239-otlp-grpc-client-options
dbarker 2e6ecce
fix changelog
dbarker ec4cd1e
Merge branch 'main' into fix-4239-otlp-grpc-client-options
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,12 +7,19 @@ | |
| #include "opentelemetry/version.h" | ||
|
|
||
| #include <chrono> | ||
| #include <memory> | ||
| #include <cstddef> | ||
| #include <cstdint> | ||
| #include <string> | ||
|
|
||
| #ifdef ENABLE_OTLP_GRPC_CREDENTIAL_PREVIEW | ||
| # include <memory> | ||
| #endif | ||
|
|
||
| namespace grpc | ||
| { | ||
| #ifdef ENABLE_OTLP_GRPC_CREDENTIAL_PREVIEW | ||
| class ChannelCredentials; | ||
| #endif | ||
| class ChannelArguments; | ||
| } // namespace grpc | ||
|
|
||
|
|
@@ -22,10 +29,16 @@ namespace exporter | |
| namespace otlp | ||
| { | ||
|
|
||
| struct OtlpGrpcClientOptions | ||
| struct OPENTELEMETRY_EXPORT OtlpGrpcClientOptions | ||
| { | ||
| virtual ~OtlpGrpcClientOptions() = default; | ||
| OtlpGrpcClientOptions() = default; | ||
| virtual ~OtlpGrpcClientOptions(); | ||
|
owent marked this conversation as resolved.
Resolved
|
||
|
|
||
| /** Lookup environment variables, and populate spec-compliant defaults. */ | ||
| OtlpGrpcClientOptions(); | ||
|
|
||
| /** No defaults. */ | ||
| explicit OtlpGrpcClientOptions(void *); | ||
|
|
||
| OtlpGrpcClientOptions(const OtlpGrpcClientOptions &) = default; | ||
| OtlpGrpcClientOptions(OtlpGrpcClientOptions &&) = default; | ||
| OtlpGrpcClientOptions &operator=(const OtlpGrpcClientOptions &) = default; | ||
|
|
@@ -35,7 +48,7 @@ struct OtlpGrpcClientOptions | |
| std::string endpoint; | ||
|
|
||
| /** Use SSL. */ | ||
| bool use_ssl_credentials{}; | ||
| bool use_ssl_credentials{true}; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not a problem, but I think it would more clear to make all member initialization in one place(Maybe in |
||
|
|
||
| /** CA CERT, path to a file. */ | ||
| std::string ssl_credentials_cacert_path; | ||
|
|
@@ -70,14 +83,14 @@ struct OtlpGrpcClientOptions | |
| std::string user_agent; | ||
|
|
||
| /** max number of threads that can be allocated from this */ | ||
| std::size_t max_threads{}; | ||
| std::size_t max_threads{0}; | ||
|
|
||
| /** Compression type. */ | ||
| std::string compression; | ||
|
|
||
| #ifdef ENABLE_ASYNC_EXPORT | ||
| // Concurrent requests | ||
| std::size_t max_concurrent_requests{}; | ||
| std::size_t max_concurrent_requests{64}; | ||
| #endif | ||
|
|
||
| /** The maximum number of call attempts, including the original attempt. */ | ||
|
|
||
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.
Uh oh!
There was an error while loading. Please reload this page.