Skip to content

Commit ff99d44

Browse files
committed
more updated/improvements
1 parent 67b29bb commit ff99d44

File tree

8 files changed

+15
-28
lines changed

8 files changed

+15
-28
lines changed

docs/platforms/dart/integrations/dio.mdx

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,10 @@ final response = await dio.get<String>('https://wrong-url.dev/');
5858
This 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

docs/platforms/flutter/session-replay/index.mdx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,11 @@ dependencies:
3232
To 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

platform-includes/enriching-events/attachment-upload/dart.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ import 'package:sentry/sentry.dart';
44
final attachment = SentryAttachment.fromByteData(bytedata);
55
66
Sentry.configureScope((scope) {
7-
scope.addAttachment(attachment);
7+
scope.addAttachment(attachment);
88
});
99
```

platform-includes/enriching-events/breadcrumbs/before-breadcrumb/flutter.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
```dart {4}
1+
```dart {3}
22
await SentryFlutter.init((options) {
33
options.beforeBreadcrumb = (breadcrumb, hint) {
44
return 'a.spammy.Logger' == breadcrumb.category ? null : breadcrumb;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
```dart
2-
Sentry.init((options) {
1+
```dart {2}
2+
await Sentry.init((options) {
33
options.tracesSampleRate = 0.2;
44
});
55
```
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
```dart {2}
2-
SentryFlutter.init((options) => {
2+
await SentryFlutter.init((options) => {
33
options.tracesSampleRate = 0.2;
44
});
55
```

platform-includes/performance/traces-sampler-as-filter/dart.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
```dart
2-
import 'package:sentry/sentry.dart';
3-
42
await Sentry.init((options) {
53
// Determine traces sample rate based on the sampling context
64
options.tracesSampler = (samplingContext) {

platform-includes/performance/traces-sampler-as-sampler/flutter.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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;

0 commit comments

Comments
 (0)