From e072400d62da5dbaeca3b6fb04f823fac5aea017 Mon Sep 17 00:00:00 2001 From: Bruno Garcia Date: Tue, 12 Dec 2023 22:01:26 -0500 Subject: [PATCH] remove opt-in from samples --- samples/Sentry.Samples.AspNetCore.Basic/Program.cs | 1 - samples/Sentry.Samples.Console.Customized/Program.cs | 7 +------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/samples/Sentry.Samples.AspNetCore.Basic/Program.cs b/samples/Sentry.Samples.AspNetCore.Basic/Program.cs index f778f44b89..d982123b56 100644 --- a/samples/Sentry.Samples.AspNetCore.Basic/Program.cs +++ b/samples/Sentry.Samples.AspNetCore.Basic/Program.cs @@ -14,7 +14,6 @@ public static IWebHost BuildWebHost(string[] args) => .UseSentry(o => { - o.EnableSpotlight = true; // A DSN is required. You can set it here, or in configuration, or in an environment variable. o.Dsn = "https://eb18e953812b41c3aeb042e666fd3b5c@o447951.ingest.sentry.io/5428537"; diff --git a/samples/Sentry.Samples.Console.Customized/Program.cs b/samples/Sentry.Samples.Console.Customized/Program.cs index 87aa852ccb..b1af6291fd 100644 --- a/samples/Sentry.Samples.Console.Customized/Program.cs +++ b/samples/Sentry.Samples.Console.Customized/Program.cs @@ -22,9 +22,7 @@ await SentrySdk.ConfigureScopeAsync(async scope => // A Sentry Data Source Name (DSN) is required. // See https://docs.sentry.io/product/sentry-basics/dsn-explainer/ // You can set it in the SENTRY_DSN environment variable, or you can set it in code here. - o.Dsn = "https://eb18e953812b41c3aeb042e666fd3b5c@o447951.ingest.sentry.io/5428537"; - - o.EnableSpotlight = true; + // o.Dsn = "... Your DSN ..."; // Send stack trace for events that were not created from an exception // e.g: CaptureMessage, log.LogDebug, log.LogInformation ... @@ -109,8 +107,6 @@ await SentrySdk.ConfigureScopeAsync(async scope => // Ignored by its type due to the setting above SentrySdk.CaptureException(new XsltCompileException()); - return; -#pragma warning disable CS0162 // Unreachable code detected SentrySdk.AddBreadcrumb( "A 'bad breadcrumb' that will be rejected because of 'BeforeBreadcrumb callback above.'"); @@ -211,7 +207,6 @@ await SentrySdk.ConfigureScopeAsync(async scope => SentrySdk.CaptureException( new Exception("Error outside of the admin section: Goes to the default DSN")); -#pragma warning restore CS0162 // Unreachable code detected } // On Dispose: SDK closed, events queued are flushed/sent to Sentry }