diff --git a/src/platforms/dart/migration.mdx b/src/platforms/dart/migration.mdx index e1379c5e32c5f..791fb62b206c9 100644 --- a/src/platforms/dart/migration.mdx +++ b/src/platforms/dart/migration.mdx @@ -4,6 +4,43 @@ sidebar_order: 1000 description: "Migrate between versions of Sentry's SDK for Dart." --- +## Migrating From `sentry` `6.18.x` to `sentry` `7.0.0` + +API changes: + +- Sentry's Dart SDK version 7.0.0 and above requires Dart `2.17.0`. +- Methods that used to take a `dynamic hint` optional parameter now take `Hint? hint` instead. +- The following deprecated fields have been removed from the `SentryDevice` class and replaced: + - `screenResolution` replaced with `screenHeightPixels` and `screenWidthPixels`. + - `timezone` replaced with `SentryCulture#timezone`. + - `language` replaced with `SentryCulture#locale`. + - `theme` replaced with `SentryOperatingSystem#theme`. +- The following deprecated field has been removed from the `Contexts#dart_context` databag and replaced: + - `isolate` replaced with `SentryThread#name`. +- The following fields have been removed from the `Scope` class and replaced: + - `user(SentryUser? user)` replaced with `setUser(SentryUser? user)`. + - `attachements` replaced with `attachments`. +- Classes or methods that used to take the below optional parameters, have been moved to the `SentryOptions` class and replaced: + - `captureFailedRequests` replaced with `SentryOptions#captureFailedRequests`. + - `sendDefaultPii` replaced with `SentryOptions#sendDefaultPii`. + - `maxRequestBodySize` replaced with `SentryOptions#maxRequestBodySize`. + - `networkTracing` replaced with `SentryOptions#tracesSampleRate` or `SentryOptions#tracesSampler`. + - `recordBreadcrumbs` replaced with `SentryOptions#recordHttpBreadcrumbs`. +- The following `SentryMeasurementUnits` are now strongly typed: + - `DurationSentryMeasurementUnit` + - `InformationSentryMeasurementUnit` + - `FractionSentryMeasurementUnit` + - `CustomSentryMeasurementUnit` + - ` NoneSentryMeasurementUnit` + +Behavior changes: + +- Sentry's Dart SDK version 7.0.0 and above supports Dart `3.0.0`. +- When an unhandled error happens and there's a running transaction, the transaction status will be set to `internal_error`. +- The `captureFailedRequests` feature is now enabled by default. +- The `enableStructuredDataTracing` feature is now enabled by default. +- The `enableUserInteractionTracing` feature is now enabled by default. + ## Migrating From `sentry` `6.5.x` to `sentry` `6.6.x` - `SentryOptions#sendClientReports` is now enabled by default. To disable it, use the code snippet below: diff --git a/src/platforms/flutter/migration.mdx b/src/platforms/flutter/migration.mdx index dd842560b1e4e..c6baa08775f3a 100644 --- a/src/platforms/flutter/migration.mdx +++ b/src/platforms/flutter/migration.mdx @@ -3,6 +3,20 @@ title: Migration Guide sidebar_order: 1000 --- +## Migrating From `sentry_flutter` `6.18.x` to `sentry` `7.0.0` + +In addition to the changes introduced in [sentry](/platforms/dart/migration/): + +API changes: + +- Sentry's Flutter SDK version 7.0.0 and above requires Flutter `3.0.0`. +- The Sentry Cocoa SDK was upgraded to `8.0.0` which introduces breaking changes, see the [migration guide](/platforms/apple/migration/#migrating-from-7x-to-8x). +- The following fields have been removed from the `SentryFlutterOptions` class and replaced: + - `enableAutoPerformanceTracking` replaced with `enableAutoPerformanceTracing`. + - `enableOutOfMemoryTracking` replaced with `enableWatchdogTerminationTracking`. + - `anrTimeoutIntervalMillis` replaced with `anrTimeoutInterval`. + - `autoSessionTrackingIntervalMillis` replaced with `autoSessionTrackingInterval`. + ## Migrating From `sentry_flutter` `6.12.x` to `sentry` `6.13.x` The SDK already runs your init `callback` on an error handler, such as [`runZonedGuarded`](https://api.flutter.dev/flutter/dart-async/runZonedGuarded.html) on Flutter versions prior to `3.3`, or [`PlatformDispatcher.onError`](https://api.flutter.dev/flutter/dart-ui/PlatformDispatcher/onError.html) on Flutter versions 3.3 and higher, so that errors are automatically captured. No code changes are needed on your part.