From d935053b41f85ba4a730c2acc3787525c6df979d Mon Sep 17 00:00:00 2001 From: Stuart Ferguson Date: Sat, 28 Mar 2026 16:35:46 +0000 Subject: [PATCH] Configure Sentry options via app configuration CaptureBlockingCalls and IncludeActivityData are now set based on values from the application's configuration, allowing these Sentry options to be toggled without code changes. This improves flexibility and maintainability. --- MobileConfiguration/Program.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MobileConfiguration/Program.cs b/MobileConfiguration/Program.cs index 60c3425..1bdf1e2 100644 --- a/MobileConfiguration/Program.cs +++ b/MobileConfiguration/Program.cs @@ -43,7 +43,8 @@ o.Dsn = sentrySection; o.SendDefaultPii = true; o.MaxRequestBodySize = RequestSize.Always; - o.CaptureBlockingCalls = true; + o.CaptureBlockingCalls = ConfigurationReader.GetValueOrDefault("SentryConfiguration", "CaptureBlockingCalls", false); + o.IncludeActivityData = ConfigurationReader.GetValueOrDefault("SentryConfiguration", "IncludeActivityData", false); o.Release = Assembly.GetExecutingAssembly().GetName().Version?.ToString() ?? "unknown"; }); }