Skip to content

Commit 6b36909

Browse files
marandanetolizokm
andauthored
Migration page for Dart and Flutter v7 (#6090)
Co-authored-by: Liza Mock <[email protected]>
1 parent 07e5202 commit 6b36909

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

src/platforms/dart/migration.mdx

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,43 @@ sidebar_order: 1000
44
description: "Migrate between versions of Sentry's SDK for Dart."
55
---
66

7+
## Migrating From `sentry` `6.18.x` to `sentry` `7.0.0`
8+
9+
API changes:
10+
11+
- Sentry's Dart SDK version 7.0.0 and above requires Dart `2.17.0`.
12+
- Methods that used to take a `dynamic hint` optional parameter now take `Hint? hint` instead.
13+
- The following deprecated fields have been removed from the `SentryDevice` class and replaced:
14+
- `screenResolution` replaced with `screenHeightPixels` and `screenWidthPixels`.
15+
- `timezone` replaced with `SentryCulture#timezone`.
16+
- `language` replaced with `SentryCulture#locale`.
17+
- `theme` replaced with `SentryOperatingSystem#theme`.
18+
- The following deprecated field has been removed from the `Contexts#dart_context` databag and replaced:
19+
- `isolate` replaced with `SentryThread#name`.
20+
- The following fields have been removed from the `Scope` class and replaced:
21+
- `user(SentryUser? user)` replaced with `setUser(SentryUser? user)`.
22+
- `attachements` replaced with `attachments`.
23+
- Classes or methods that used to take the below optional parameters, have been moved to the `SentryOptions` class and replaced:
24+
- `captureFailedRequests` replaced with `SentryOptions#captureFailedRequests`.
25+
- `sendDefaultPii` replaced with `SentryOptions#sendDefaultPii`.
26+
- `maxRequestBodySize` replaced with `SentryOptions#maxRequestBodySize`.
27+
- `networkTracing` replaced with `SentryOptions#tracesSampleRate` or `SentryOptions#tracesSampler`.
28+
- `recordBreadcrumbs` replaced with `SentryOptions#recordHttpBreadcrumbs`.
29+
- The following `SentryMeasurementUnits` are now strongly typed:
30+
- `DurationSentryMeasurementUnit`
31+
- `InformationSentryMeasurementUnit`
32+
- `FractionSentryMeasurementUnit`
33+
- `CustomSentryMeasurementUnit`
34+
- ` NoneSentryMeasurementUnit`
35+
36+
Behavior changes:
37+
38+
- Sentry's Dart SDK version 7.0.0 and above supports Dart `3.0.0`.
39+
- When an unhandled error happens and there's a running transaction, the transaction status will be set to `internal_error`.
40+
- The `captureFailedRequests` feature is now enabled by default.
41+
- The `enableStructuredDataTracing` feature is now enabled by default.
42+
- The `enableUserInteractionTracing` feature is now enabled by default.
43+
744
## Migrating From `sentry` `6.5.x` to `sentry` `6.6.x`
845

946
- `SentryOptions#sendClientReports` is now enabled by default. To disable it, use the code snippet below:

src/platforms/flutter/migration.mdx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,20 @@ title: Migration Guide
33
sidebar_order: 1000
44
---
55

6+
## Migrating From `sentry_flutter` `6.18.x` to `sentry` `7.0.0`
7+
8+
In addition to the changes introduced in [sentry](/platforms/dart/migration/):
9+
10+
API changes:
11+
12+
- Sentry's Flutter SDK version 7.0.0 and above requires Flutter `3.0.0`.
13+
- 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).
14+
- The following fields have been removed from the `SentryFlutterOptions` class and replaced:
15+
- `enableAutoPerformanceTracking` replaced with `enableAutoPerformanceTracing`.
16+
- `enableOutOfMemoryTracking` replaced with `enableWatchdogTerminationTracking`.
17+
- `anrTimeoutIntervalMillis` replaced with `anrTimeoutInterval`.
18+
- `autoSessionTrackingIntervalMillis` replaced with `autoSessionTrackingInterval`.
19+
620
## Migrating From `sentry_flutter` `6.12.x` to `sentry` `6.13.x`
721

822
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.

0 commit comments

Comments
 (0)