Fix Sentry sending telemetry data when analytics is disabled

Change Sentry log level threshold from Debug to Warn

Prevents Sentry from capturing and sending debug-level events to sentry.servarr.com during startup before the telemetry configuration is loaded. This respects users' analytics opt-out preference earlier in the application lifecycle.

Aligns with Sonarr's implementation for consistent behavior across Servarr applications.
This commit is contained in:
Kevin Hanks 2026-02-18 15:12:56 -08:00 committed by GitHub
parent 89110c2cc8
commit a18944f7bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -87,7 +87,7 @@ private static void RegisterSentry(bool updateClient, IAppFolderInfo appFolderIn
Layout = "${message}"
};
var loggingRule = new LoggingRule("*", updateClient ? LogLevel.Trace : LogLevel.Debug, target);
var loggingRule = new LoggingRule("*", updateClient ? LogLevel.Trace : LogLevel.Warn, target);
LogManager.Configuration.AddTarget("sentryTarget", target);
LogManager.Configuration.LoggingRules.Add(loggingRule);