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:
Magne Sjaastad committed 2026-02-26 08:23:53 +01:00
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;
}