Skip to content

Commit ef13eb4

Browse files
committed
Update CHANGELOG
1 parent 935def9 commit ef13eb4

File tree

1 file changed

+72
-72
lines changed

1 file changed

+72
-72
lines changed

CHANGELOG.md

Lines changed: 72 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -152,25 +152,25 @@ SentryDisplayWidget(child: YourWidget())
152152
// Then report TTFD after long running work (File I/O, Network) within your widget.
153153
@override
154154
void initState() {
155-
super.initState();
156-
// Do some long running work...
157-
Future.delayed(const Duration(seconds: 3), () {
158-
if (mounted) {
159-
SentryDisplayWidget.of(context).reportFullyDisplayed();
160-
}
161-
});
155+
super.initState();
156+
// Do some long running work...
157+
Future.delayed(const Duration(seconds: 3), () {
158+
if (mounted) {
159+
SentryDisplayWidget.of(context).reportFullyDisplayed();
160+
}
161+
});
162162
}
163163
164164
// Method 2: use the API directly to report TTFD - this does not require wrapping your widget with `SentryDisplayWidget`:
165165
@override
166166
void initState() {
167-
super.initState();
168-
// Get a reference to the current display before doing work.
169-
final currentDisplay = SentryFlutter.currentDisplay();
170-
// Do some long running work...
171-
Future.delayed(const Duration(seconds: 3), () {
172-
currentDisplay?.reportFullyDisplayed();
173-
});
167+
super.initState();
168+
// Get a reference to the current display before doing work.
169+
final currentDisplay = SentryFlutter.currentDisplay();
170+
// Do some long running work...
171+
Future.delayed(const Duration(seconds: 3), () {
172+
currentDisplay?.reportFullyDisplayed();
173+
});
174174
}
175175
```
176176
- Add `message` parameter to `captureException()` ([#2882](https://github.com/getsentry/sentry-dart/pull/2882))
@@ -195,18 +195,18 @@ currentDisplay?.reportFullyDisplayed();
195195
Version 9.0.0 marks a major release of the Sentry Dart/Flutter SDKs containing breaking changes.
196196

197197
The goal of this release is the following:
198-
- Bump the minimum Dart and Flutter versions to `3.5.0` and `3.24.0` respectively
199-
- Bump the minimum Android API version to 21
200-
- Add interoperability with the Sentry Javascript SDK in Flutter Web for features such as release health and reporting native JS errors
201-
- GA the [Session Replay](https://docs.sentry.io/product/explore/session-replay/) feature
202-
- Provide feature flag support as well as [Firebase Remote Config](https://firebase.google.com/docs/remote-config) support
203-
- Trim down unused and potentially confusing APIs
198+
- Bump the minimum Dart and Flutter versions to `3.5.0` and `3.24.0` respectively
199+
- Bump the minimum Android API version to 21
200+
- Add interoperability with the Sentry Javascript SDK in Flutter Web for features such as release health and reporting native JS errors
201+
- GA the [Session Replay](https://docs.sentry.io/product/explore/session-replay/) feature
202+
- Provide feature flag support as well as [Firebase Remote Config](https://firebase.google.com/docs/remote-config) support
203+
- Trim down unused and potentially confusing APIs
204204

205205
### How To Upgrade
206206

207207
Please carefully read through the migration guide in the Sentry docs on how to upgrade from version 8 to version 9
208-
- [Dart migration guide](https://docs.sentry.io/platforms/dart/migration/#migrating-from-sentry-8x-to-sentry-9x)
209-
- [Flutter migration guide](https://docs.sentry.io/platforms/dart/guides/flutter/migration/#migrating-from-sentry_flutter-8x-to-sentry_flutter-9x)
208+
- [Dart migration guide](https://docs.sentry.io/platforms/dart/migration/#migrating-from-sentry-8x-to-sentry-9x)
209+
- [Flutter migration guide](https://docs.sentry.io/platforms/dart/guides/flutter/migration/#migrating-from-sentry_flutter-8x-to-sentry_flutter-9x)
210210

211211
### Breaking changes
212212

@@ -240,13 +240,13 @@ Please carefully read through the migration guide in the Sentry docs on how to u
240240
```dart
241241
// old
242242
options.beforeSend = (event, hint) {
243-
event = event.copyWith(release: 'my-release');
244-
return event;
243+
event = event.copyWith(release: 'my-release');
244+
return event;
245245
}
246246
// new
247247
options.beforeSend = (event, hint) {
248-
event.release = 'my-release';
249-
return event;
248+
event.release = 'my-release';
249+
return event;
250250
}
251251
```
252252

@@ -262,10 +262,10 @@ options.enableLogs = true;
262262
// Use `Sentry.logger`
263263
Sentry.logger.info("This is a info log.");
264264
Sentry.logger.warn("This is a warning log with attributes.", attributes: {
265-
'string-attribute': SentryLogAttribute.string('string'),
266-
'int-attribute': SentryLogAttribute.int(1),
267-
'double-attribute': SentryLogAttribute.double(1.0),
268-
'bool-attribute': SentryLogAttribute.bool(true),
265+
'string-attribute': SentryLogAttribute.string('string'),
266+
'int-attribute': SentryLogAttribute.int(1),
267+
'double-attribute': SentryLogAttribute.double(1.0),
268+
'bool-attribute': SentryLogAttribute.bool(true),
269269
});
270270
```
271271
- Add support for feature flags and integration with Firebase Remote Config ([#2825](https://github.com/getsentry/sentry-dart/pull/2825), [#2837](https://github.com/getsentry/sentry-dart/pull/2837))
@@ -276,14 +276,14 @@ Sentry.addFeatureFlag('my-feature', true);
276276
// or use the Sentry Firebase Remote Config Integration (sentry_firebase_remote_config package is required)
277277
// Add the integration to automatically track feature flags from firebase remote config.
278278
await SentryFlutter.init(
279-
(options) {
280-
options.dsn = 'https://example@sentry.io/add-your-dsn-here';
281-
options.addIntegration(
282-
SentryFirebaseRemoteConfigIntegration(
283-
firebaseRemoteConfig: yourFirebaseRemoteConfig,
284-
),
285-
);
286-
},
279+
(options) {
280+
options.dsn = 'https://example@sentry.io/add-your-dsn-here';
281+
options.addIntegration(
282+
SentryFirebaseRemoteConfigIntegration(
283+
firebaseRemoteConfig: yourFirebaseRemoteConfig,
284+
),
285+
);
286+
},
287287
);
288288
```
289289
- Properly generates and links trace IDs for errors and spans ([#2869](https://github.com/getsentry/sentry-dart/pull/2869), [#2861](https://github.com/getsentry/sentry-dart/pull/2861)):
@@ -352,10 +352,10 @@ options.enableLogs = true;
352352
// Use `Sentry.logger`
353353
Sentry.logger.info("This is a info log.");
354354
Sentry.logger.warn("This is a warning log with attributes.", attributes: {
355-
'string-attribute': SentryLogAttribute.string('string'),
356-
'int-attribute': SentryLogAttribute.int(1),
357-
'double-attribute': SentryLogAttribute.double(1.0),
358-
'bool-attribute': SentryLogAttribute.bool(true),
355+
'string-attribute': SentryLogAttribute.string('string'),
356+
'int-attribute': SentryLogAttribute.int(1),
357+
'double-attribute': SentryLogAttribute.double(1.0),
358+
'bool-attribute': SentryLogAttribute.bool(true),
359359
});
360360
```
361361

@@ -414,14 +414,14 @@ Sentry.addFeatureFlag('my-feature', true);
414414
```dart
415415
// Add the integration to automatically track feature flags from firebase remote config.
416416
await SentryFlutter.init(
417-
(options) {
418-
options.dsn = 'https://example@sentry.io/add-your-dsn-here';
419-
options.addIntegration(
420-
SentryFirebaseRemoteConfigIntegration(
421-
firebaseRemoteConfig: yourFirebaseRemoteConfig,
422-
),
423-
);
424-
},
417+
(options) {
418+
options.dsn = 'https://example@sentry.io/add-your-dsn-here';
419+
options.addIntegration(
420+
SentryFirebaseRemoteConfigIntegration(
421+
firebaseRemoteConfig: yourFirebaseRemoteConfig,
422+
),
423+
);
424+
},
425425
);
426426
```
427427
- Make hierarchical exception grouping opt-in ([#2858](https://github.com/getsentry/sentry-dart/pull/2858))
@@ -481,7 +481,7 @@ firebaseRemoteConfig: yourFirebaseRemoteConfig,
481481

482482
- Add support for Flutter Web release health ([#2794](https://github.com/getsentry/sentry-dart/pull/2794))
483483
- Requires using `SentryNavigatorObserver`;
484-
484+
485485
### Dependencies
486486

487487
- Bump Native SDK from v0.7.20 to v0.8.2 ([#2761](https://github.com/getsentry/sentry-dart/pull/2761), [#2807](https://github.com/getsentry/sentry-dart/pull/2807))
@@ -496,7 +496,7 @@ firebaseRemoteConfig: yourFirebaseRemoteConfig,
496496
- Set sentry-native backend to `crashpad` by default and `breakpad` for Windows ARM64 ([#2791](https://github.com/getsentry/sentry-dart/pull/2791))
497497
- Setting the `SENTRY_NATIVE_BACKEND` environment variable will override the defaults.
498498
- Remove renderer from `flutter_context` ([#2751](https://github.com/getsentry/sentry-dart/pull/2751))
499-
499+
500500
### API changes
501501

502502
- Move replay and privacy from experimental to options ([#2755](https://github.com/getsentry/sentry-dart/pull/2755))
@@ -594,7 +594,7 @@ final db = AppDatabase(executor);
594594
- Responses are attached to the `Hint` object, which can be read in `beforeSend`/`beforeSendTransaction` callbacks via `hint.response`.
595595
- For now, only the `dio` integration is supported.
596596
- Enable privacy masking for screenshots by default ([#2728](https://github.com/getsentry/sentry-dart/pull/2728))
597-
597+
598598
### Enhancements
599599

600600
- Replay: improve Android native interop performance by using JNI ([#2670](https://github.com/getsentry/sentry-dart/pull/2670))
@@ -1464,8 +1464,8 @@ This release fixes an issue where Cold starts can be incorrectly reported as War
14641464
- Add `SentryFlutter.nativeCrash()` using MethodChannels for Android and iOS ([#2239](https://github.com/getsentry/sentry-dart/pull/2239))
14651465
- This can be used to test if native crash reporting works
14661466
- Add `ignoreRoutes` parameter to `SentryNavigatorObserver`. ([#2218](https://github.com/getsentry/sentry-dart/pull/2218))
1467-
- This will ignore the Routes and prevent the Route from being pushed to the Sentry server.
1468-
- Ignored routes will also create no TTID and TTFD spans.
1467+
- This will ignore the Routes and prevent the Route from being pushed to the Sentry server.
1468+
- Ignored routes will also create no TTID and TTFD spans.
14691469
```dart
14701470
SentryNavigatorObserver(ignoreRoutes: ["/ignoreThisRoute"]),
14711471
```
@@ -2302,15 +2302,15 @@ options.readTimeout = Duration(seconds: 10);
23022302

23032303
```dart
23042304
Sentry.configureScope(
2305-
(scope) => scope.setUser(SentryUser(
2306-
id: '1234',
2307-
name: 'Jane Doe',
2308-
email: 'jane.doe@example.com',
2309-
geo: SentryGeo(
2310-
city: 'Vienna',
2311-
countryCode: 'AT',
2312-
region: 'Austria',
2313-
))),
2305+
(scope) => scope.setUser(SentryUser(
2306+
id: '1234',
2307+
name: 'Jane Doe',
2308+
email: 'jane.doe@example.com',
2309+
geo: SentryGeo(
2310+
city: 'Vienna',
2311+
countryCode: 'AT',
2312+
region: 'Austria',
2313+
))),
23142314
);
23152315
```
23162316

@@ -2321,14 +2321,14 @@ region: 'Austria',
23212321
import 'dart:convert';
23222322
23232323
options.beforeSend = (event, {hint}) {
2324-
final text = 'This event should not be sent happen in prod. Investigate.';
2325-
final textAttachment = SentryAttachment.fromIntList(
2326-
utf8.encode(text),
2327-
'event_info.txt',
2328-
contentType: 'text/plain',
2329-
);
2330-
hint?.attachments.add(textAttachment);
2331-
return event;
2324+
final text = 'This event should not be sent happen in prod. Investigate.';
2325+
final textAttachment = SentryAttachment.fromIntList(
2326+
utf8.encode(text),
2327+
'event_info.txt',
2328+
contentType: 'text/plain',
2329+
);
2330+
hint?.attachments.add(textAttachment);
2331+
return event;
23322332
};
23332333
```
23342334

0 commit comments

Comments
 (0)