NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #281 most downloaded on pub.dev
A crash reporting library for Dart that sends crash reports to Sentry.io. This library supports Dart VM and Web. For Flutter consider sentry_flutter instead.
Last release 3 days ago
02 Oct 2026
Ships on a steady schedule
a new release about every 2 weeks
Nearly every release is documented
notes for 59 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
9 years old
263 releases · first in 2017
Add os and device attributes to Flutter logs
Flutter Web: add debug ids to events
One column per quarter.
3.0.0 or higher// Prerequisite: `SentryNavigatorObserver` is set up and routes you navigate to have unique names, e.g configured via `RouteSettings`
// Info: Stateless widgets will report TTFD automatically when wrapped with `SentryDisplayWidget` - no need to call `reportFullyDisplayed`.
// Method 1: wrap your widget that you navigate to in `SentryDisplayWidget`
SentryDisplayWidget(child: YourWidget())
// Then report TTFD after long running work (File I/O, Network) within your widget.
@override
void initState() {
super.initState();
// Do some long running work...
Future.delayed(const Duration(seconds: 3), () {
if (mounted) {
SentryDisplayWidget.of(context).reportFullyDisplayed();
}
});
}
// Method 2: use the API directly to report TTFD - this does not require wrapping your widget with `SentryDisplayWidget`:
@override
void initState() {
super.initState();
// Get a reference to the current display before doing work.
final currentDisplay = SentryFlutter.currentDisplay();
// Do some long running work...
Future.delayed(const Duration(seconds: 3), () {
currentDisplay?.reportFullyDisplayed();
});
}
message parameter to captureException() (#2882)SentryOptions.includeModuleInStackTrace = true to enable this. This may change grouping of exceptions.Version 9.0.0 marks a major release of the Sentry Dart/Flutter SDKs containing breaking changes.
Version 9.0.0 marks a major release of the Sentry Dart/Flutter SDKs containing breaking changes.
The goal of this release is the following:
3.5.0 and 3.24.0 respectivelyPlease carefully read through the migration guide in the Sentry docs on how to upgrade from version 8 to version 9
v3.5.0 and Flutter v3.24.0 (#2643)LoadImagesListIntegration to LoadNativeDebugImagesIntegration (#2833)crashpad by default and breakpad for Windows ARM64 (#2791)
SENTRY_NATIVE_BACKEND environment variable will override the defaults.attachScreenshotOnlyWhenResumed (#2664)beforeScreenshot (#2662)beforeCaptureScreenshotenableTracing (#2695)options.autoAppStart and setAppStartEnd (#2680)2.24.0 and use QueryInterceptor instead of QueryExecutor (#2679)BeforeSendTransactionCallback now has a Hint parameterdart:html usage in favour of package:web (#2710)Hint object, which can be read in beforeSend/beforeSendTransaction callbacks via hint.response.dio integration is supported.anrEnabled to true by default (#2878)const constructors anymore.copyWith and clone methods of SDK classes were deprecated.// old
options.beforeSend = (event, hint) {
event = event.copyWith(release: 'my-release');
return event;
}
// new
options.beforeSend = (event, hint) {
event.release = 'my-release';
return event;
}
SentryLogger has been renamed to SdkLogCallback and can be accessed through options.log now.Sentry.logger:// Enable in `SentryOptions`:
options.enableLogs = true;
// Use `Sentry.logger`
Sentry.logger.info("This is a info log.");
Sentry.logger.warn("This is a warning log with attributes.", attributes: {
'string-attribute': SentryLogAttribute.string('string'),
'int-attribute': SentryLogAttribute.int(1),
'double-attribute': SentryLogAttribute.double(1.0),
'bool-attribute': SentryLogAttribute.bool(true),
});
// Manually track a feature flag
Sentry.addFeatureFlag('my-feature', true);
// or use the Sentry Firebase Remote Config Integration (sentry_firebase_remote_config package is required)
// Add the integration to automatically track feature flags from firebase remote config.
await SentryFlutter.init(
(options) {
options.dsn = 'https://example@sentry.io/add-your-dsn-here';
options.addIntegration(
SentryFirebaseRemoteConfigIntegration(
firebaseRemoteConfig: yourFirebaseRemoteConfig,
),
);
},
);
SentryNavigatorObserver - each navigation event starts a new trace.SentryNavigatorObserver on non-web platforms - a new trace is started from app
lifecycle hooks.SentryNavigatorObserver - the same trace ID is reused until the page is
refreshed or closed.SentryNavigatorObserver;warning by default when debug = true (#2836)SentryLevel.errorSentryLevel.warningoptions.groupException = truefeedback client report for dropped feedback eventsfeedback client report for errors when using HttpTransportErrors caught by OnErrorIntegration should be unhandled by default
The copyWith and clone methods of SDK classes were deprecated.
SentryNavigatorObserver - each navigation event starts a new trace.SentryNavigatorObserver on non-web platforms - a new trace is started from app
lifecycle hooks.SentryNavigatorObserver - the same trace ID is reused until the page is
refreshed or closed.FeatureFlagIntegration (#2825)// Manually track a feature flag
Sentry.addFeatureFlag('my-feature', true);
// Add the integration to automatically track feature flags from firebase remote config.
await SentryFlutter.init(
(options) {
options.dsn = 'https://example@sentry.io/add-your-dsn-here';
options.addIntegration(
SentryFirebaseRemoteConfigIntegration(
firebaseRemoteConfig: yourFirebaseRemoteConfig,
),
);
},
);
const constructors anymore.copyWith and clone methods of SDK classes were deprecated.warning by default when debug = true (#2836)SentryLevel.errorSentryLevel.warninggroupExceptions=trueanrEnabled enabled per default (#2878)LoadImagesListIntegration to LoadNativeDebugImagesIntegration (#2833)other from SentryRequest (#2879)Add support for Flutter Web release health
SentryNavigatorObserver;crashpad by default and breakpad for Windows ARM64 (#2791)
SENTRY_NATIVE_BACKEND environment variable will override the defaults.flutter_context (#2751)Remove deprecated beforeScreenshot
SentryDisplayWidget and manual TTID implementation (#2668)attachScreenshotOnlyWhenResumed (#2664)beforeScreenshot (#2662)enableTracing (#2695)options.autoAppStart and setAppStartEnd (#2680)2.24.0 and use QueryInterceptor instead of QueryExecutor (#2679)BeforeSendTransactionCallback now has a Hint parameterdart:html usage in favour of package:web (#2710)Hint object, which can be read in beforeSend/beforeSendTransaction callbacks via hint.response.dio integration is supported.### Enhancements - Replay: Mask RichText Widgets
The old SentryLogger has been renamed to SdkLogCallback and can be accessed through options.log now.
SentryLogger has been renamed to SdkLogCallback and can be accessed through options.log now.Sentry.logger:// Enable in `SentryOptions`:
options.enableLogs = true;
// Use `Sentry.logger`
Sentry.logger.info("This is a info log.");
Sentry.logger.warn("This is a warning log with attributes.", attributes: {
'string-attribute': SentryLogAttribute.string('string'),
'int-attribute': SentryLogAttribute.int(1),
'double-attribute': SentryLogAttribute.double(1.0),
'bool-attribute': SentryLogAttribute.bool(true),
});
Add hasSize guard when using a renderObject in SentryUserInteractionWidget
hasSize guard when using a renderObject in SentryUserInteractionWidget (#2946)### Fixes - Fix feature flag model keys
build(deps): bump ruby/setup-ruby from 1.233.0 to 1.237.0 (#2908) by @dependabot
Improve performance of frames tracking
Improve platform memory collection on windows/linux
Deprecate Drift SentryQueryExecutor
This release fixes an issue where Cold starts can be incorrectly reported as Warm starts on Android.
SentryUser is now guarded by sendDefaultPii (#2726)
options.sendDefaultPii = true or manually set the IP address of the SentryUser to {{auto}}sendDefaultPii (#2741)
options.sendDefaultPii = true if you want to have the device name reportedloadDebugImagesForAddresses API for Android (#2706)
loadDebugImagesForAddresses are empty, the SDK loads all debug images as fallbackScreenshotIntegration, WidgetsBindingIntegration and SentryWidget in multi-view apps #2366 (#2366)captureFailedRequests param to FailedRequestInterceptor (#2744)SentryWidgetsFlutterBinding in warning message in FramesTrackingIntegration (#2704)SentryQueryExecutor (#2715)
SentryQueryInterceptor in the next major v9// Example usage in Sentry Flutter v9
final executor = NativeDatabase.memory().interceptWith(
SentryQueryInterceptor(databaseName: 'your_db_name'),
);
final db = AppDatabase(executor);
autoAppStart and setAppStartEnd (#2681)Deprecate Drift SentryQueryExecutor
SentryUser is now guarded by sendDefaultPii (#2726)
options.sendDefaultPii = true or manually set the IP address of the SentryUser to {{auto}}sendDefaultPii (#2741)
options.sendDefaultPii = true if you want to have the device name reportedScreenshotIntegration, WidgetsBindingIntegration and SentryWidget in multi-view apps #2366 (#2366)loadDebugImagesForAddresses API for Android (#2706)
loadDebugImagesForAddresses are empty, the SDK loads all debug images as fallbackSentryWidgetsFlutterBinding in warning message in FramesTrackingIntegration (#2704)SentryQueryExecutor (#2715)
SentryQueryInterceptor in the next major v9// Example usage in Sentry Flutter v9
final executor = NativeDatabase.memory().interceptWith(
SentryQueryInterceptor(databaseName: 'your_db_name'),
);
final db = AppDatabase(executor);
autoAppStart and setAppStartEnd (#2681)This release fixes an issue where Cold starts can be incorrectly reported as Warm starts on Android.
> This release contains an issue where Cold starts can be incorrectly reported as Warm starts on Android. We recommend staying on version 8.12.0 if yo
[!WARNING] This release contains an issue where Cold starts can be incorrectly reported as Warm starts on Android. We recommend staying on version 8.12.0 if you use this feature on Android. See issue #2769 for more details.
build_web_compiler error (#2736)
if (dart.library.html) instead of if (dart.html) for imports> This release contains an issue where Cold starts can be incorrectly reported as Warm starts on Android. We recommend staying on version 8.12.0 if yo
[!WARNING] This release contains an issue where Cold starts can be incorrectly reported as Warm starts on Android. We recommend staying on version 8.12.0 if you use this feature on Android. See issue #2769 for more details.
navigation breadcrumb is missing to route info (#2720)> This release contains an issue where Cold starts can be incorrectly reported as Warm starts on Android. We recommend staying on version 8.12.0 if yo
[!WARNING] This release contains an issue where Cold starts can be incorrectly reported as Warm starts on Android. We recommend staying on version 8.12.0 if you use this feature on Android. See issue #2769 for more details.
beforeCapture for View Hierarchy (#2523)
options.enableSentryJs = trueoptions.experimental.replay.quality) (#2582)options.debug when in debug mode (#2597)SentryAssetBundle (#2577)sentry_link to Sentry. You can view the changelog for the previous versions here (#2338)
Enable options.debug when in debug mode
Add SentryReplayQuality setting (options.experimental.replay.quality)
The Metrics product never reached maturity from beta and has officially ended in October 7th, 2024
beforeCapture for View Hierarchy (#2523)
options.enableSentryJs = trueMissing replay gestures on Android
SentryTracer type in TTFD tracker (#2508)Replay: device orientation change support & improve video size fit on Android (#2462)
Support custom Sentry.runZoneGuarded zone creation (#2088)
Sentry.runZonedGuarded creates a zone and also captures exceptions & breadcrumbs automatically.Sentry.runZonedGuarded(() {
WidgetsBinding.ensureInitialized();
// Errors before init will not be handled by Sentry
SentryFlutter.init(
(options) {
...
},
appRunner: () => runApp(MyApp()),
);
}, (error, stackTrace) {
// Automatically sends errors to Sentry, no need to do any
// captureException calls on your part.
// On top of that, you can do your own custom stuff in this callback.
});
Warning (in a debug build) if a potentially sensitive widget is not masked or unmasked explicitly (#2375)
Replay: ensure visual update before capturing screenshots (#2527)
Missing replay gestures on Android
SentryTracer type in TTFD tracker (#2508)Replay: device orientation change support & improve video size fit on Android
Sentry.runZoneGuarded zone creation (#2088)
Sentry.runZonedGuarded creates a zone and also captures exceptions & breadcrumbs automatically.Sentry.runZonedGuarded(() {
WidgetsBinding.ensureInitialized();
// Errors before init will not be handled by Sentry
SentryFlutter.init(
(options) {
...
},
appRunner: () => runApp(MyApp()),
);
}, (error, stackTrace) {
// Automatically sends errors to Sentry, no need to do any
// captureException calls on your part.
// On top of that, you can do your own custom stuff in this callback.
});
Windows & Linux native crash handlers: add SENTRY_NATIVE_BACKEND env var with default setting of none. (#2522) Native crash reporting support with sen
Windows & Linux native crash handlers: add SENTRY_NATIVE_BACKEND env var with default setting of none. (#2522)
Native crash reporting support with sentry-native's crashpad was added in v8.11.0 and has caused build-time issues
for some users, because it required newer build tools (newer versions of MSVC/Clang/GCC) than base Flutter SDK.
This broke the ability to build the app for some users compiling Windows and Linux apps with older toolchains.
To avoid this issue, we're disabling the native crash handling by default for Linux and Windows for now.
You can enable it manually by setting the SENTRY_NATIVE_BACKEND=crashpad environment variable before running flutter build.
You can read more about available backends that fit your use-case in sentry-native docs.
We plan to change the default back to crashpad in the next major SDK release.
Check for type before casting in TTID
Replace deprecated BeforeScreenshotCallback with new BeforeCaptureCallback.
Android 15: Add support for 16KB page sizes (#3620)
Support for screenshot PII content masking (#2361)
By default, masking is enabled for SessionReplay. To also enable it for screenshots captured with events, you can specify options.experimental.privacy:
await SentryFlutter.init(
(options) {
...
// the defaults are:
options.experimental.privacy.maskAllText = true;
options.experimental.privacy.maskAllImages = true;
options.experimental.privacy.maskAssetImages = false;
// you cal also set up custom masking, for example:
options.experimental.privacy.mask<WebView>();
},
appRunner: () => runApp(MyApp()),
);
Actually, just accessing this field will cause it to be initialized with the default settings to mask all text and images:
await SentryFlutter.init(
(options) {
...
// this has a side-effect of creating the default privacy configuration, thus enabling Screenshot masking:
options.experimental.privacy;
},
appRunner: () => runApp(MyApp()),
);
Linux native error & obfuscation support (#2431)
Improve Device context on plain Dart and Flutter desktop apps (#2441)
Add debounce to capturing screenshots (#2368)
Per default, screenshots are debounced for 2 seconds.
If you need more granular screenshots, you can opt out of debouncing:
await SentryFlutter.init((options) {
options.beforeCaptureScreenshot = (event, hint, debounce) {
if (debounce) {
return true; // Capture screenshot even if the SDK wants to debounce it.
} else {
// check event and hint
...
}
};
});
Replace deprecated BeforeScreenshotCallback with new BeforeCaptureCallback.
Improve app start measurements by using addTimingsCallback instead of addPostFrameCallback to determine app start end (#2405)
Improve frame tracking accuracy (#2372)
Introduces SentryWidgetsFlutterBinding that tracks a frame starting from handleBeginFrame and ending in handleDrawFrame, this is approximately the buildDuration time
By default, SentryFlutter.init() automatically initializes SentryWidgetsFlutterBinding through the WidgetsFlutterBindingIntegration
If you need to initialize the binding before SentryFlutter.init, use SentryWidgetsFlutterBinding.ensureInitialized instead of WidgetsFlutterBinding.ensureInitialized:
void main() async {
// Replace WidgetsFlutterBinding.ensureInitialized()
SentryWidgetsFlutterBinding.ensureInitialized();
await SentryFlutter.init(...);
runApp(MyApp());
}
⚠️ Frame tracking will be disabled if a different binding is used
sentry frames if SDK falls back to current stack trace (#2351)
captureException, or captureMessage):
StackTrace.currenthandleBeginFrame and handleDrawFrame (#2446)1.4 to 1.6 (#2456){{auto}}) to transactions (#2395)
Replace deprecated BeforeScreenshotCallback with new BeforeCaptureCallback.
options.experimental.privacy:await SentryFlutter.init(
(options) {
...
// the defaults are:
options.experimental.privacy.maskAllText = true;
options.experimental.privacy.maskAllImages = true;
options.experimental.privacy.maskAssetImages = false;
// you cal also set up custom masking, for example:
options.experimental.privacy.mask<WebView>();
},
appRunner: () => runApp(MyApp()),
);
Actually, just accessing this field will cause it to be initialized with the default settings to mask all text and images:await SentryFlutter.init(
(options) {
...
// this has a side-effect of creating the default privacy configuration, thus enabling Screenshot masking:
options.experimental.privacy;
},
appRunner: () => runApp(MyApp()),
);
await SentryFlutter.init((options) {
options.beforeCaptureScreenshot = (event, hint, debounce) {
if (debounce) {
return true; // Capture screenshot even if the SDK wants to debounce it.
} else {
// check event and hint
...
}
};
});
BeforeScreenshotCallback with new BeforeCaptureCallback.handleBeginFrame and handleDrawFrame (#2446)1.4 to 1.6 (#2456)Windows native error & obfuscation support (#2286, #2426)
addTimingsCallback instead of addPostFrameCallback to determine app start end (#2405)
SentryWidgetsFlutterBinding that tracks a frame starting from handleBeginFrame and ending in handleDrawFrame, this is approximately the buildDuration timeSentryFlutter.init() automatically initializes SentryWidgetsFlutterBinding through the WidgetsFlutterBindingIntegrationSentryFlutter.init, use SentryWidgetsFlutterBinding.ensureInitialized instead of WidgetsFlutterBinding.ensureInitialized:void main() async {
// Replace WidgetsFlutterBinding.ensureInitialized()
SentryWidgetsFlutterBinding.ensureInitialized();
await SentryFlutter.init(...);
runApp(MyApp());
}
sentry frames if SDK falls back to current stack trace (#2351)
captureException, or captureMessage):
StackTrace.current{{auto}}) to transactions (#2395)
Android build error when compiling
Deprecated Sentry.captureUserFeedback, use captureFeedback instead.
Emit transaction.data inside contexts.trace.data (#2284)
Blocking app starts span if "appLaunchedInForeground" is false. (Android only) (#2291)
Replay: user-configurable masking (redaction) for widget classes and specific widget instances. (#2324) Some examples of the configuration:
await SentryFlutter.init(
(options) {
...
options.experimental.replay.mask<IconButton>();
options.experimental.replay.unmask<Image>();
options.experimental.replay.maskCallback<Text>(
(Element element, Text widget) =>
(widget.data?.contains('secret') ?? false)
? SentryMaskingDecision.mask
: SentryMaskingDecision.continueProcessing);
},
appRunner: () => runApp(MyApp()),
);
Also, you can wrap any of your widgets with SentryMask() or SentryUnmask() widgets to mask/unmask them, respectively. For example:
SentryUnmask(Text('Not secret at all'));
Support captureFeedback (#2230)
Sentry.captureUserFeedback, use captureFeedback instead.Hub.captureUserFeedback, use captureFeedback instead.SentryClient.captureUserFeedback, use captureFeedback instead.SentryUserFeedback, use SentryFeedback instead.Add SentryFeedbackWidget (#2240)
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => SentryFeedbackWidget(associatedEventId: id),
fullscreenDialog: true,
),
);
Add screenshot to SentryFeedbackWidget (#2369)
SentryFlutter.captureScreenshot to create a screenshot attachmentSentryFeedbackWidget with this attachment to add it to the user feedbackfinal id = await Sentry.captureMessage('UserFeedback');
final screenshot = await SentryFlutter.captureScreenshot();
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => SentryFeedbackWidget(
associatedEventId: id,
screenshot: screenshot,
),
fullscreenDialog: true,
),
);
SentryOptions.maxQueueSize. Default is 30.onErrorSampleRate is specified (#2306)fetchNativeAppStart should return null (#2340)Temporarily disable Windows native error & obfuscation support
Deprecated Sentry.captureUserFeedback, use captureFeedback instead.
Emit transaction.data inside contexts.trace.data (#2284)
Blocking app starts if "appLaunchedInForeground" is false. (Android only) (#2291)
Windows native error & obfuscation support (#2286)
Replay: user-configurable masking (redaction) for widget classes and specific widget instances. (#2324) Some examples of the configuration:
await SentryFlutter.init(
(options) {
...
options.experimental.replay.mask<IconButton>();
options.experimental.replay.unmask<Image>();
options.experimental.replay.maskCallback<Text>(
(Element element, Text widget) =>
(widget.data?.contains('secret') ?? false)
? SentryMaskingDecision.mask
: SentryMaskingDecision.continueProcessing);
},
appRunner: () => runApp(MyApp()),
);
Also, you can wrap any of your widgets with SentryMask() or SentryUnmask() widgets to mask/unmask them, respectively. For example:
SentryUnmask(Text('Not secret at all'));
Support captureFeedback (#2230)
Sentry.captureUserFeedback, use captureFeedback instead.Hub.captureUserFeedback, use captureFeedback instead.SentryClient.captureUserFeedback, use captureFeedback instead.SentryUserFeedback, use SentryFeedback instead.Add SentryFeedbackWidget (#2240)
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => SentryFeedbackWidget(associatedEventId: id),
fullscreenDialog: true,
),
);
onErrorSampleRate is specified (#2306)fetchNativeAppStart should return null (#2340)SentryFlutter.reportFullyDisplayed() twice (#2339)Session replay Alpha for Android and iOS (#2208, #2269, #2236, #2275, #2270). To try out replay, you can set following options (access is limited to e
Session replay Alpha for Android and iOS (#2208, #2269, #2236, #2275, #2270). To try out replay, you can set following options (access is limited to early access orgs on Sentry. If you're interested, sign up for the waitlist):
await SentryFlutter.init(
(options) {
...
options.experimental.replay.sessionSampleRate = 1.0;
options.experimental.replay.onErrorSampleRate = 1.0;
},
appRunner: () => runApp(MyApp()),
);
Support allowUrls and denyUrls for Flutter Web (#2227)
await SentryFlutter.init(
(options) {
...
options.allowUrls = ["^https://sentry.com.*\$", "my-custom-domain"];
options.denyUrls = ["^.*ends-with-this\$", "denied-url"];
},
appRunner: () => runApp(MyApp()),
);
Collect touch breadcrumbs for all buttons, not just those with key specified. (#2242)
Add enableDartSymbolication option to Sentry.init() for Flutter iOS, macOS and Android (#2256)
true by default but automatically set to false when using SentryFlutter.init() because the SentryFlutter fetches debug images from the native SDK integrations.hasSize is true (#2263)Add SentryFlutter.nativeCrash() using MethodChannels for Android and iOS
SentryFlutter.nativeCrash() using MethodChannels for Android and iOS (#2239)
ignoreRoutes parameter to SentryNavigatorObserver. (#2218)
SentryNavigatorObserver(ignoreRoutes: ["/ignoreThisRoute"]),
Android replay touch tracking support
ignoreRoutes parameter to SentryNavigatorObserver. (#2218)
SentryNavigatorObserver(ignoreRoutes: ["/ignoreThisRoute"]),
Add support for span level measurements.
Add support for span level measurements. (#2214)
Add ignoreTransactions and ignoreErrors to options (#2207)
await SentryFlutter.init(
(options) {
options.dsn = 'https://examplePublicKey@o0.ingest.sentry.io/0';
options.ignoreErrors = ["my-error", "^error-.*\$"];
options.ignoreTransactions = ["my-transaction", "^transaction-.*\$"];
...
},
appRunner: () => runApp(MyApp()),
);
Add proxy support (#2192)
SentryProxy object and set it on SentryFlutter.initimport 'package:flutter/widgets.dart';
import 'package:sentry_flutter/sentry_flutter.dart';
Future<void> main() async {
await SentryFlutter.init(
(options) {
options.dsn = 'https://example@sentry.io/add-your-dsn-here';
options.proxy = SentryProxy(
type: SentryProxyType.http,
host: 'localhost',
port: 8080,
);
},
// Init your App.
appRunner: () => runApp(MyApp()),
);
}
The enableTracing option has been deprecated and will be removed in the next major version. We recommend removing it in favor of the tracesSampleRate…
Add error type identifier to improve obfuscated Flutter issue titles (#2170)
GA to FlutterError or minified:nE to FlutterErrorenableExceptionTypeIdentification to false in your Sentry options// How to add your own custom exception identifier
class MyCustomExceptionIdentifier implements ExceptionIdentifier {
@override
String? identifyType(Exception exception) {
if (exception is MyCustomException) {
return 'MyCustomException';
}
if (exception is MyOtherCustomException) {
return 'MyOtherCustomException';
}
return null;
}
}
SentryFlutter.init((options) =>
options..prependExceptionTypeIdentifier(MyCustomExceptionIdentifier()));
enableTracing (#2199)
enableTracing option has been deprecated and will be removed in the next major version. We recommend removing it
in favor of the tracesSampleRate and tracesSampler options. If you want to enable performance monitoring, please set
the tracesSampleRate to a sample rate of your choice, or provide a sampling function as tracesSampler option
instead. If you want to disable performance monitoring, remove the tracesSampler and tracesSampleRate options.To try out replay, you can set following options:
Android Session Replay Alpha (#2032)
To try out replay, you can set following options:
await SentryFlutter.init(
(options) {
...
options.experimental.replay.sessionSampleRate = 1.0;
options.experimental.replay.onErrorSampleRate = 1.0;
},
appRunner: () => runApp(MyApp()),
);
Access is limited to early access orgs on Sentry. If you're interested, sign up for the waitlist
Nothing published for this version
Add dart platform to sentry frames
ignoredExceptionsForType (#2150)
SentryOptions.addExceptionFilterForType(Type exceptionType)User segment is now deprecated and will be removed in version 9.0.0. Use a custom tag or context instead.
SentryFlutter.pauseAppHangTracking() and SentryFlutter.resumeAppHangTracking()reportViewHierarchyIdentifiers to enable or disable the optionautoAppStarts is false and setAppStartEnd has not been called, the app start event processor will now return early instead of waiting for getAppStartInfo to finishPlatform.version (#2156)User segment is now deprecated and will be removed in version 9.0.0. Use a custom tag or context instead.
SentryFlutter.pauseAppHangTracking() and SentryFlutter.resumeAppHangTracking()This is not a breaking change since we are using api internally that is only valid from that version.
Include sentry frames in stacktraces to enable SDK crash detection
autoAppStart is false (#2028)SentryNavigatorObserver is present (#2017)PlatformException title parsing (#2033)Set snapshot to true if stacktrace is not provided
true if stacktrace is not provided (#2000)
StackTrace.current and the snapshot will be set to true - this may change the grouping behaviorsnapshot = true means it's a synthetic exception, reflecting the current state of the thread rather than the stack trace of a real exceptionThis release contains breaking changes, please read the changelog carefully.
This release contains breaking changes, please read the changelog carefully.
Changes from the latest v7 release are included in this major release
handled: false (#1535)
hint non-nullable in BeforeSendCallback, BeforeBreadcrumbCall and EventProcessor (#1574)
BeforeSendCallbackThis will affect your release health data, and is therefore considered a breaking change.
handled: false (#1535)
hint non-nullable in BeforeSendCallback, BeforeBreadcrumbCall and EventProcessor (#1574)
BeforeSendCallbackThis release is replaced by 8.0.0-beta.2
This release is replaced by 8.0.0-beta.2
Nothing published for this version
The user ip-address is now only set to "{{auto}}" if sendDefaultPii is enabled
"{{auto}}" if sendDefaultPii is enabled (#4071)
Bump compileSdkVersion to 34 in Gradle buildscripts
To enable Replay use the sessionReplay.sessionSampleRate or sessionReplay.onErrorSampleRate options.
import io.sentry.SentryReplayOptions
import io.sentry.android.core.SentryAndroid
SentryAndroid.init(context) { options ->
options.sessionReplay.sessionSampleRate = 1.0
options.sessionReplay.onErrorSampleRate = 1.0
// To change default redaction behavior (defaults to true)
options.sessionReplay.redactAllImages = true
options.sessionReplay.redactAllText = true
// To change quality of the recording (defaults to MEDIUM)
options.sessionReplay.quality = SentryReplayOptions.SentryReplayQuality.MEDIUM // (LOW|MEDIUM|HIGH)
}
SdkVersion for replay events (#4014)experimental to the main options object (#4017)Experimental: Add support for Sentry Developer Metrics (#1940, #1949, #1954, #1958) Use the Metrics API to track processing time, download sizes, user
Sentry.metrics()
.increment(
'button_login_click', // key
value: 1.0,
unit: null,
tags: {"provider": "e-mail"}
);
To learn more about Sentry Developer Metrics, head over to our Dart and Flutter docs page.package_info_plus version range to 6.0.0 (#1948)sentry_flutter.podspec version from pubspec.yaml (#1941)IndexOutOfBoundsException when tracking window changesIllegalStateException when adding/removing draw listener for a dead viewConcurrentModificationException when registering window listeners and stopping WindowRecorder/GestureRecorderAdd TTFD (time to full display), which allows you to measure the time it takes to render the full screen
enableTimeToFullDisplayTracing = true in your SentryFlutterOptions to enable TTFDSentryFlutter.reportFullyDisplayed()deadline_exceededautomatic mode is enabled by default for all screens and will yield only an approximation result.manual mode requires manual instrumentation and will yield a more accurate result.
manual mode, you need to wrap your desired widget: SentryDisplayWidget(child: MyScreen()).didPop doesn't trigger a new transactionui.load instead of navigationcaptureFailedRequests option (#1931)
dio integration and SentryHttpClient now take an additional captureFailedRequests option.dio for example.root / instead of root ("/").beforeSendReplay callback (#3855)Fix transaction end timestamp trimming
recordHttpBreadcrumbs to set iOS enableNetworkBreadcrumbs (#1884)beforeBreadcrumb on native iOS crumbs (#1914)maxQueueSize to limit the number of unawaited events sent to Sentry (#1868)Random instance per thread to improve SDK performance (#3835)Remove Flutter dependency from Drift integration
Prefer to use SentryWidget now instead of SentryScreenshotWidget and SentryUserInteractionWidget directly
SentryWidget (#1846)
SentryWidget now instead of SentryScreenshotWidget and SentryUserInteractionWidget directlyMap<String, dynamic> in Hint class (#1807)
Hint
Hint.withMap(Map<String, dynamic> map) now takes Map<String, dynamic> instead of Map<String, Object>hint.addAll(Map<String, dynamic> keysAndValues) now takes Map<String, dynamic> instead of Map<String, Object>set(String key, dynamic value) now takes value of dynamic instead of Objecthint.get(String key) now returns dynamic instead of Object?enableTracing option (#3777)java.util.Random and replace java.security.SecureRandom usages (#3783)Log calls on app startup (#3793)addIntegrationToSdkVersion(Ljava/lang/Class;)V has been removed from the core (io.sentry:sentry) package. Please make sure all of the packages (e.g. io.sentry:sentry-android-core, io.sentry:sentry-android-fragment, io.sentry:sentry-okhttp and others) are all aligned and using the same version to prevent the NoSuchMethodError exception.Set options.spotlight = Spotlight(enabled: true) to enable Spotlight
options.spotlight = Spotlight(enabled: true) to enable SpotlightConnectivityIntegration for web (#1765)
wifi or none.appFlavor to the flutter_context (#1799)readTransaction in sqflite (#1819)feedback envelope header item type (#3687)android:tag="sentry-mask|sentry-unmask" in XML or view.setTag("sentry-mask|sentry-unmask") in code tags
<tag android:id="@id/sentry_privacy" android:value="mask|unmask"/> in XML or view.setTag(io.sentry.android.replay.R.id.sentry_privacy, "mask|unmask") in codeview.sentryReplayMask() or view.sentryReplayUnmask() extension functionsViews of a certain type by adding fully-qualified classname to one of the lists options.experimental.sessionReplay.addMaskViewClass() or options.experimental.sessionReplay.addUnmaskViewClass(). Note, that all of the view subclasses/subtypes will be masked/unmasked as well
TextViews and their subclasses (RadioButton, EditText, etc.): options.experimental.sessionReplay.addMaskViewClass("android.widget.TextView")Modifier.sentryReplayMask() and Modifier.sentryReplayUnmask() modifiersWebView, VideoView and androidx.media3.ui.PlayerView by default (#3775)TextViews with Spans (#3682)Calendar.getInstance usage in Breadcrumbs constructor (#3736)SentryOptions members to avoid ANRs on app start (#3749)Breaking changes:
options.experimental.sessionReplay.errorSampleRate was renamed to options.experimental.sessionReplay.onErrorSampleRate (#3637)io.sentry.session-replay.error-sample-rate was renamed to io.sentry.session-replay.on-error-sample-rate (#3637)redactAllText and redactAllImages to maskAllText and maskAllImages (#3741)Your coding agent can read these notes before it upgrades. Set up the MCP server →