Skip to content
Merged
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
4 changes: 3 additions & 1 deletion docs/platforms/dart/common/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ dependencies:
To capture all errors, initialize the Sentry Dart SDK as soon as possible.


```dart {"onboardingOptions": {"performance": "9-11"}}
```dart
import 'package:sentry/sentry.dart';

Future<void> main() async {
Expand All @@ -60,9 +60,11 @@ Future<void> main() async {
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/dart/data-management/data-collected/ for more info
options.sendDefaultPii = true;
// ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100% of transactions for tracing.
// We recommend adjusting this value in production.
options.tracesSampleRate = 1.0;
// ___PRODUCT_OPTION_END___ performance
});

// you can also configure SENTRY_DSN, SENTRY_RELEASE, SENTRY_DIST, and
Expand Down
12 changes: 10 additions & 2 deletions docs/platforms/dart/guides/flutter/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ npx @sentry/wizard@latest -i flutter

Configuration should happen as early as possible in your application's lifecycle.

```dart {"onboardingOptions": {"performance": "11-13", "profiling": "14-17"}}
```dart
import 'package:flutter/widgets.dart';
import 'package:sentry_flutter/sentry_flutter.dart';

Expand All @@ -72,13 +72,17 @@ Future<void> main() async {
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/dart/guides/flutter/data-management/data-collected/ for more info
options.sendDefaultPii = true;
// ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100% of transactions for tracing.
// We recommend adjusting this value in production.
options.tracesSampleRate = 1.0;
// ___PRODUCT_OPTION_END___ performance
// ___PRODUCT_OPTION_START___ profiling
// The sampling rate for profiling is relative to tracesSampleRate
// Setting to 1.0 will profile 100% of sampled transactions:
// Note: Profiling alpha is available for iOS and macOS since SDK version 7.12.0
options.profilesSampleRate = 1.0;
// ___PRODUCT_OPTION_END___ profiling
},
appRunner: () => runApp(
SentryWidget(
Expand All @@ -92,7 +96,7 @@ Future<void> main() async {
}
```

```dart {tabTitle:With custom zone} {"onboardingOptions": {"performance": "19-21", "profiling": "22-25"}}
```dart {tabTitle:With custom zone}
import 'package:flutter/widgets.dart';
import 'package:sentry_flutter/sentry_flutter.dart';

Expand All @@ -111,13 +115,17 @@ Future<void> main() async {
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/dart/guides/flutter/data-management/data-collected/ for more info
options.sendDefaultPii = true;
// ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100% of transactions for tracing.
// We recommend adjusting this value in production.
options.tracesSampleRate = 1.0;
// ___PRODUCT_OPTION_END___ performance
// ___PRODUCT_OPTION_START___ profiling
// The sampling rate for profiling is relative to tracesSampleRate
// Setting to 1.0 will profile 100% of sampled transactions:
// Note: Profiling alpha is available for iOS and macOS since SDK version 7.12.0
options.profilesSampleRate = 1.0;
// ___PRODUCT_OPTION_END___ profiling
},
appRunner: () => runApp(
SentryWidget(
Expand Down
12 changes: 10 additions & 2 deletions docs/platforms/dart/guides/flutter/manual-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dependencies:

Configuration should happen as early as possible in your application's lifecycle.

```dart {"onboardingOptions": {"performance": "11-13", "profiling": "14-17"}}
```dart
import 'package:flutter/widgets.dart';
import 'package:sentry_flutter/sentry_flutter.dart';

Expand All @@ -38,13 +38,17 @@ Future<void> main() async {
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/dart/guides/flutter/data-management/data-collected/ for more info
options.sendDefaultPii = true;
// ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100% of transactions for tracing.
// We recommend adjusting this value in production.
options.tracesSampleRate = 1.0;
// ___PRODUCT_OPTION_END___ performance
// ___PRODUCT_OPTION_START___ profiling
// The sampling rate for profiling is relative to tracesSampleRate
// Setting to 1.0 will profile 100% of sampled transactions:
// Note: Profiling alpha is available for iOS and macOS since SDK version 7.12.0
options.profilesSampleRate = 1.0;
// ___PRODUCT_OPTION_END___ profiling
},
appRunner: () => runApp(
SentryWidget(
Expand All @@ -58,7 +62,7 @@ Future<void> main() async {
}
```

```dart {tabTitle:With custom zone} {"onboardingOptions": {"performance": "19-21", "profiling": "22-25"}}
```dart {tabTitle:With custom zone}
import 'package:flutter/widgets.dart';
import 'package:sentry_flutter/sentry_flutter.dart';

Expand All @@ -77,13 +81,17 @@ Future<void> main() async {
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/dart/guides//data-management/data-collected/ for more info
options.sendDefaultPii = true;
// ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100% of transactions for tracing.
// We recommend adjusting this value in production.
options.tracesSampleRate = 1.0;
// ___PRODUCT_OPTION_END___ performance
// ___PRODUCT_OPTION_START___ profiling
// The sampling rate for profiling is relative to tracesSampleRate
// Setting to 1.0 will profile 100% of sampled transactions:
// Note: Profiling alpha is available for iOS and macOS since SDK version 7.12.0
options.profilesSampleRate = 1.0;
// ___PRODUCT_OPTION_END___ profiling
},
appRunner: () => runApp(
SentryWidget(
Expand Down