Skip to content

Commit

Permalink
tmp: use sentry.init in the flutter example
Browse files Browse the repository at this point in the history
  • Loading branch information
vaind committed Sep 18, 2024
1 parent d2ee5ac commit 1c7b63d
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions flutter/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,36 +62,36 @@ Future<void> setupSentry(
bool isIntegrationTest = false,
BeforeSendCallback? beforeSendCallback,
}) async {
await SentryFlutter.init(
await Sentry.init(
(options) {
options.dsn = exampleDsn;
options.tracesSampleRate = 1.0;
options.profilesSampleRate = 1.0;
options.reportPackages = false;
// options.profilesSampleRate = 1.0;
// options.reportPackages = false;
options.addInAppInclude('sentry_flutter_example');
options.considerInAppFramesByDefault = false;
options.attachThreads = true;
options.enableWindowMetricBreadcrumbs = true;
// options.enableWindowMetricBreadcrumbs = true;
options.addIntegration(LoggingIntegration(minEventLevel: Level.INFO));
options.sendDefaultPii = true;
options.reportSilentFlutterErrors = true;
options.attachScreenshot = true;
options.screenshotQuality = SentryScreenshotQuality.low;
options.attachViewHierarchy = true;
// options.reportSilentFlutterErrors = true;
// options.attachScreenshot = true;
// options.screenshotQuality = SentryScreenshotQuality.low;
// options.attachViewHierarchy = true;
// We can enable Sentry debug logging during development. This is likely
// going to log too much for your app, but can be useful when figuring out
// configuration issues, e.g. finding out why your events are not uploaded.
options.debug = true;
options.spotlight = Spotlight(enabled: true);
options.enableTimeToFullDisplayTracing = true;
// options.enableTimeToFullDisplayTracing = true;
options.enableMetrics = true;

options.maxRequestBodySize = MaxRequestBodySize.always;
options.maxResponseBodySize = MaxResponseBodySize.always;
options.navigatorKey = navigatorKey;
// options.navigatorKey = navigatorKey;

options.experimental.replay.sessionSampleRate = 1.0;
options.experimental.replay.onErrorSampleRate = 1.0;
// options.experimental.replay.sessionSampleRate = 1.0;
// options.experimental.replay.onErrorSampleRate = 1.0;

_isIntegrationTest = isIntegrationTest;
if (_isIntegrationTest) {
Expand Down

0 comments on commit 1c7b63d

Please sign in to comment.