mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-31 09:14:11 -05:00
Remove LoggingState enum from OpenTelemetry preferences
OpenTelemetry initialization is now driven by the presence of a config file: if no config file is found (connection string is empty), init is skipped silently without writing to the log.
This commit is contained in:
1 parent
494d0fe064
commit
71e57f9beb
4 files changed
+45
-93
No files matched your search
@@ -125,11 +125,10 @@ bool RiaOpenTelemetryManager::initialize()
|
||||
{
|
||||
std::lock_guard<std::mutex> lock( m_configMutex );
|
||||
|
||||
// Check if OpenTelemetry is disabled in preferences
|
||||
// Skip initialization if no config file was found (connection string is empty)
|
||||
auto* prefs = RiaPreferencesOpenTelemetry::current();
|
||||
if ( prefs && prefs->loggingState() == RiaPreferencesOpenTelemetry::LoggingState::DISABLED )
|
||||
if ( !prefs || prefs->connectionString().isEmpty() )
|
||||
{
|
||||
RiaLogging::info( "OpenTelemetry is disabled in preferences" );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user