Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions samples/Sentry.Samples.Android/MainActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ protected override void OnCreate(Bundle? savedInstanceState)
// Enable Native Android SDK ANR detection
options.Native.AnrEnabled = true;

// If your app doesn't have sensitive data, you can attach screenshots automatically when a Java/native
// error is captured.
// https://docs.sentry.io/platforms/android/configuration/options/#attachScreenshot
options.Native.AttachScreenshot = true;

// Currently experimental support is only available on Android
options.Native.ExperimentalOptions.SessionReplay.OnErrorSampleRate = 1.0;
options.Native.ExperimentalOptions.SessionReplay.SessionSampleRate = 1.0;
Expand Down
4 changes: 4 additions & 0 deletions samples/Sentry.Samples.Ios/AppDelegate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ public override bool FinishedLaunching(UIApplication application, NSDictionary?
// Enable Native iOS SDK App Hangs detection
options.Native.EnableAppHangTracking = true;

// If your app doesn't have sensitive data, you can get screenshots on error events automatically
// https://docs.sentry.io/platforms/apple/guides/ios/configuration/options/#attachScreenshot
options.Native.AttachScreenshot = true;

options.CacheDirectoryPath = Path.GetTempPath();

options.SetBeforeSend(evt =>
Expand Down
4 changes: 4 additions & 0 deletions samples/Sentry.Samples.MacCatalyst/AppDelegate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ public override bool FinishedLaunching(UIApplication application, NSDictionary?
options.Dsn = EnvironmentVariables.Dsn;
#endif
options.Debug = true;

// If your app doesn't have sensitive data, you can get screenshots on error events automatically
// https://docs.sentry.io/platforms/apple/guides/ios/configuration/options/#attachScreenshot
options.Native.AttachScreenshot = true;
});

// Try out the Sentry SDK
Expand Down
3 changes: 2 additions & 1 deletion samples/Sentry.Samples.Maui/MauiProgram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ public static MauiApp CreateMauiApp()
// If you want to see everything we can capture from MAUI, you may wish to use a larger value.
options.MaxBreadcrumbs = 1000;

// Be aware that screenshots may contain PII
// If your app doesn't have sensitive data, you can get screenshots on error events automatically
// https://docs.sentry.io/platforms/dotnet/guides/maui/configuration/options/#AttachScreenshot
options.AttachScreenshot = true;

options.Debug = true;
Expand Down
Loading