File tree Expand file tree Collapse file tree 8 files changed +15
-28
lines changed
breadcrumbs/before-breadcrumb
traces-sampler-as-sampler Expand file tree Collapse file tree 8 files changed +15
-28
lines changed Original file line number Diff line number Diff line change @@ -58,18 +58,10 @@ final response = await dio.get<String>('https://wrong-url.dev/');
5858This is an opt-out feature. The following example shows how to disable it:
5959
6060
61- ``` dart
62- import 'package:sentry/sentry.dart';
63-
64- Future<void> main() async {
65- await Sentry.init(
66- (options) {
67- options.dsn = '___PUBLIC_DSN___';
68- options.captureFailedRequests = false;
69- },
70- appRunner: initApp, // Init your App.
71- );
72- }
61+ ``` dart {2}
62+ await Sentry.init((options) {
63+ options.captureFailedRequests = false;
64+ });
7365```
7466
7567## Tracing for HTTP Requests
Original file line number Diff line number Diff line change @@ -32,14 +32,11 @@ dependencies:
3232To set up the integration, add the following to your Sentry initialization:
3333
3434` ` ` dart
35- await SentryFlutter.init(
36- (options) {
37- ...
38- options.experimental.replay.sessionSampleRate = 1.0;
39- options.experimental.replay.onErrorSampleRate = 1.0;
40- },
41- appRunner : () => runApp(MyApp()),
42- );
35+ await SentryFlutter.init((options) {
36+ ...
37+ options.experimental.replay.sessionSampleRate = 1.0;
38+ options.experimental.replay.onErrorSampleRate = 1.0;
39+ });
4340```
4441
4542## Verify
Original file line number Diff line number Diff line change @@ -4,6 +4,6 @@ import 'package:sentry/sentry.dart';
44final attachment = SentryAttachment.fromByteData(bytedata);
55
66Sentry.configureScope((scope) {
7- scope.addAttachment(attachment);
7+ scope.addAttachment(attachment);
88});
99```
Original file line number Diff line number Diff line change 1- ``` dart {4 }
1+ ``` dart {3 }
22await SentryFlutter.init((options) {
33 options.beforeBreadcrumb = (breadcrumb, hint) {
44 return 'a.spammy.Logger' == breadcrumb.category ? null : breadcrumb;
Original file line number Diff line number Diff line change 1- ``` dart
2- Sentry.init((options) {
1+ ``` dart {2}
2+ await Sentry.init((options) {
33 options.tracesSampleRate = 0.2;
44});
55```
Original file line number Diff line number Diff line change 11``` dart {2}
2- SentryFlutter.init((options) => {
2+ await SentryFlutter.init((options) => {
33 options.tracesSampleRate = 0.2;
44});
55```
Original file line number Diff line number Diff line change 11``` dart
2- import 'package:sentry/sentry.dart';
3-
42await Sentry.init((options) {
53 // Determine traces sample rate based on the sampling context
64 options.tracesSampler = (samplingContext) {
Original file line number Diff line number Diff line change 11``` dart
2- SentryFlutter.init((options) {
2+ await SentryFlutter.init((options) {
33 // Determine traces sample rate based on the sampling context
44 options.tracesSampler = (samplingContext) {
55 final ctx = samplingContext.customSamplingContext;
You can’t perform that action at this time.
0 commit comments