You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Errors before init will not be handled by Sentry
82
+
83
+
await SentryFlutter.init(
84
+
(options) {
85
+
options.dsn = '___PUBLIC_DSN___';
86
+
// Set tracesSampleRate to 1.0 to capture 100% of transactions for tracing.
87
+
// We recommend adjusting this value in production.
88
+
options.tracesSampleRate = 1.0;
89
+
// The sampling rate for profiling is relative to tracesSampleRate
90
+
// Setting to 1.0 will profile 100% of sampled transactions:
91
+
// Note: Profiling alpha is available for iOS and macOS since SDK version 7.12.0
92
+
options.profilesSampleRate = 1.0;
93
+
},
94
+
appRunner: () => runApp(MyApp()),
95
+
);
96
+
} (error, stackTrace) {
97
+
// Automatically sends errors to Sentry, no need to do any
98
+
// captureException calls on your part.
99
+
// On top of that, you can do your own custom stuff in this callback.
100
+
});
101
+
102
+
// you can also configure SENTRY_DSN, SENTRY_RELEASE, SENTRY_DIST, and
103
+
// SENTRY_ENVIRONMENT via Dart environment variable (--dart-define)
104
+
}
105
+
```
106
+
74
107
## Verify
75
108
76
109
Verify that your app is sending events to Sentry by adding the following snippet, which includes an intentional error. You should see the error reported in Sentry within a few minutes.
0 commit comments