diff --git a/CHANGELOG.md b/CHANGELOG.md index c15213b151..f82a5f8c1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,25 @@ - Emit `transaction.data` inside `contexts.trace.data` ([#2284](https://github.com/getsentry/sentry-dart/pull/2284)) - Blocking app starts if "appLaunchedInForeground" is false. (Android only) ([#2291](https://github.com/getsentry/sentry-dart/pull/2291)) +- Replay: user-configurable masking (redaction) for widget classes and specific widget instances. ([#2324](https://github.com/getsentry/sentry-dart/pull/2324)) + Some examples of the configuration: + + ```dart + await SentryFlutter.init( + (options) { + ... + options.experimental.replay.mask(); + options.experimental.replay.unmask(); + options.experimental.replay.maskCallback( + (Element element, Text widget) => + (widget.data?.contains('secret') ?? false) + ? MaskingDecision.mask + : MaskingDecision.continueProcessing); + }, + appRunner: () => runApp(MyApp()), + ); + ``` + ### Enhancements diff --git a/flutter/lib/sentry_flutter.dart b/flutter/lib/sentry_flutter.dart index ba4d939d86..70a59eec51 100644 --- a/flutter/lib/sentry_flutter.dart +++ b/flutter/lib/sentry_flutter.dart @@ -12,6 +12,7 @@ export 'src/sentry_replay_options.dart'; export 'src/flutter_sentry_attachment.dart'; export 'src/sentry_asset_bundle.dart' show SentryAssetBundle; export 'src/integrations/on_error_integration.dart'; +export 'src/replay/masking_config.dart' show MaskingDecision; export 'src/screenshot/sentry_mask_widget.dart'; export 'src/screenshot/sentry_unmask_widget.dart'; export 'src/screenshot/sentry_screenshot_widget.dart';