Skip to content

Commit

Permalink
Error handling - Sentry | disable Sentry for debug
Browse files Browse the repository at this point in the history
  • Loading branch information
bricefriha committed Jan 22, 2025
1 parent 57990be commit 08ce7aa
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions App/MauiProgram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,21 @@ public static MauiApp CreateMauiApp()
#endif
builder.UseMauiApp<App>()
.UseSentry(options => {
// The DSN is the only required setting.
options.Dsn = "https://6a618edd553c62a09273c0899febf030@o4508638278844416.ingest.de.sentry.io/4508638282580048";

#if DEBUG
// Sentry just pollute my logs in Debug so I disabled it
options.Dsn = "";
#else
// The DSN is the only required setting.
options.Dsn = "https://6a618edd553c62a09273c0899febf030@o4508638278844416.ingest.de.sentry.io/4508638282580048";
#endif

// Use debug mode if you want to see what the SDK is doing.
// Debug messages are written to stdout with Console.Writeline,
// and are viewable in your IDE's debug console or with 'adb logcat', etc.
// This option is not recommended when deploying your application.
#if DEBUG
options.Debug = true;
#else
options.Debug = false;
#endif

// Set TracesSampleRate to 1.0 to capture 100% of transactions for tracing.
// We recommend adjusting this value in production.
options.TracesSampleRate = 1.0;

// Other Sentry options can be set here.
})
.ConfigureFonts(fonts =>
{
Expand Down

0 comments on commit 08ce7aa

Please sign in to comment.