diff --git a/docs/platforms/flutter/index.mdx b/docs/platforms/flutter/index.mdx index c28e909175f6c..b85029d40cf7f 100644 --- a/docs/platforms/flutter/index.mdx +++ b/docs/platforms/flutter/index.mdx @@ -62,7 +62,11 @@ Future main() async { // Note: Profiling alpha is available for iOS and macOS since SDK version 7.12.0 options.profilesSampleRate = 1.0; }, - appRunner: () => runApp(MyApp()), + appRunner: () => runApp( + SentryWidget( + child: MyApp(), + ), + ), ); // you can also configure SENTRY_DSN, SENTRY_RELEASE, SENTRY_DIST, and @@ -94,7 +98,11 @@ Future main() async { // Note: Profiling alpha is available for iOS and macOS since SDK version 7.12.0 options.profilesSampleRate = 1.0; }, - appRunner: () => runApp(MyApp()), + appRunner: () => runApp( + SentryWidget( + child: MyApp(), + ), + ), ); } (error, stackTrace) { // Automatically sends errors to Sentry, no need to do any diff --git a/docs/platforms/flutter/session-replay/index.mdx b/docs/platforms/flutter/session-replay/index.mdx index a7cbae4f80449..e5c1fbef33f86 100644 --- a/docs/platforms/flutter/session-replay/index.mdx +++ b/docs/platforms/flutter/session-replay/index.mdx @@ -27,14 +27,21 @@ dependencies: ## Setup -To set up the integration, add the following to your Sentry initialization: +To set up replay, enable it by setting a non-zero sample rate. Also, make sure you've `SentryWidget` wrapping your app: ```dart -await SentryFlutter.init((options) { - ... - options.experimental.replay.sessionSampleRate = 1.0; - options.experimental.replay.onErrorSampleRate = 1.0; -}); +await SentryFlutter.init( + (options) { + ... + options.experimental.replay.sessionSampleRate = 1.0; + options.experimental.replay.onErrorSampleRate = 1.0; + }, + appRunner: () => runApp( + SentryWidget( + child: MyApp(), + ), + ), +); ``` ## Verify