[CONFIGURATION] Internal logging cleanup - #4479
Conversation
… messages for unsupported models. Clean up debug messages
… when tls may not be configured as expected
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4479 +/- ##
==========================================
+ Coverage 83.09% 83.10% +0.02%
==========================================
Files 519 519
Lines 20253 20234 -19
==========================================
- Hits 16827 16814 -13
+ Misses 3426 3420 -6
🚀 New features to boost your workflow:
|
| options.ssl_client_key_path = tls->key_file; | ||
| options.ssl_client_cert_path = tls->cert_file; | ||
| #else | ||
| if (!tls->key_file.empty() || !tls->cert_file.empty()) |
There was a problem hiding this comment.
The alternative reasonable option is to throw an exception when these tls options are configured but not supported.
| else | ||
| { | ||
| std::fprintf(stdout, "FAILED TO CREATE SDK\n"); | ||
| std::exit(2); |
There was a problem hiding this comment.
The return codes are now propagated to main by the InitOtel and CleanupOtel and the functional tests see the program exit with the same return value as before for failure to parse the yaml and failure to create the sdk.
| } | ||
|
|
||
| // Set the log level if the SDK has been created successfully. | ||
| opentelemetry::sdk::common::internal_log::GlobalLogHandler::SetLogLevel(sdk->log_level); |
There was a problem hiding this comment.
Before the log_level was only set if the user calls ConfiguredSdk::Install which seems unexpected as the Configured providers may be used with or without the Install step.
Fixes # (issue)
This PR cleans up internal logging from declarative configuration.
The following use cases are addressed:
Changes
For significant contributions please make sure you have completed the following items:
CHANGELOG.mdupdated for non-trivial changes