From 75320244fc687d61c562f902e20446d9ab5e0129 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Schultz=20Madsen?= Date: Sun, 20 Oct 2024 19:20:04 +0200 Subject: [PATCH] Changing Sentry init options. --- ServiceItemsPlanningPlugin/Core.cs | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/ServiceItemsPlanningPlugin/Core.cs b/ServiceItemsPlanningPlugin/Core.cs index f46ecaf..5a14d75 100644 --- a/ServiceItemsPlanningPlugin/Core.cs +++ b/ServiceItemsPlanningPlugin/Core.cs @@ -128,29 +128,16 @@ public bool Start(string sdkConnectionString, string serviceLocation) // This might be helpful, or might interfere with the normal operation of your application. // We enable it here for demonstration purposes when first trying Sentry. // You shouldn't do this in your applications unless you're troubleshooting issues with Sentry. - options.Debug = true; + options.Debug = false; // This option is recommended. It enables Sentry's "Release Health" feature. options.AutoSessionTracking = true; - // Set TracesSampleRate to 1.0 to capture 100% - // of transactions for tracing. - // We recommend adjusting this value in production. - options.TracesSampleRate = 1.0; - - // Sample rate for profiling, applied on top of othe TracesSampleRate, - // e.g. 0.2 means we want to profile 20 % of the captured transactions. - // We recommend adjusting this value in production. - options.ProfilesSampleRate = 1.0; - // Requires NuGet package: Sentry.Profiling - // Note: By default, the profiler is initialized asynchronously. This can - // be tuned by passing a desired initialization timeout to the constructor. - // options.AddIntegration(new ProfilingIntegration( - // // During startup, wait up to 500ms to profile the app startup code. - // // This could make launching the app a bit slower so comment it out if you - // // prefer profiling to start asynchronously - // TimeSpan.FromMilliseconds(500) - // )); + // Enabling this option is recommended for client applications only. It ensures all threads use the same global scope. + options.IsGlobalModeEnabled = false; + + // Example sample rate for your transactions: captures 10% of transactions + options.TracesSampleRate = 0.1; }); Console.WriteLine("ServiceItemsPlanningPlugin start called"); try