-
Notifications
You must be signed in to change notification settings - Fork 438
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
Move env-var read logic to common dir, and optional reading of env-var #924
Conversation
Codecov Report
@@ Coverage Diff @@
## main #924 +/- ##
==========================================
+ Coverage 95.36% 95.36% +0.01%
==========================================
Files 159 160 +1
Lines 6775 6779 +4
==========================================
+ Hits 6460 6464 +4
Misses 315 315
|
{ | ||
constexpr char kOtlpGrpcIsSslEnableEnv[] = "OTEL_EXPORTER_OTLP_GRPC_SSL_ENABLE"; | ||
auto ssl_enable = opentelemetry::sdk::common::GetEnvironmentVariable(kOtlpGrpcIsSslEnableEnv); | ||
if (ssl_enable == "True" || ssl_enable == "TRUE" || ssl_enable == "true" || ssl_enable == "1") |
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.
Convert it to lower case before comparison, to make the comparison case insensitive?
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.
Good point will change that.
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.
Ok. I realize there is no method available in stdlib
to perform this conversion. we have to iterate over the string to convert it. The existing comparison looks simple as compared to that :)
/easycla |
Changes
Please provide a brief description of the changes here.
For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes