Skip to content

Commit

Permalink
remove opt-in from samples
Browse files Browse the repository at this point in the history
  • Loading branch information
bruno-garcia committed Dec 13, 2023
1 parent ec8df96 commit e072400
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
1 change: 0 additions & 1 deletion samples/Sentry.Samples.AspNetCore.Basic/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
7 changes: 1 addition & 6 deletions samples/Sentry.Samples.Console.Customized/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 ...
Expand Down Expand Up @@ -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.'");

Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit e072400

Please sign in to comment.