Skip to content

Commit 6a8651f

Browse files
authored
Merge branch 'main' into feat/supabase
2 parents d28daa6 + 95280e5 commit 6a8651f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1468
-508
lines changed

.github/workflows/flutter_test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ jobs:
114114
fail-fast: false
115115
matrix:
116116
target: [ios, macos]
117-
sdk: [stable, beta]
117+
# disable beta for now as there are issues with minimum deployment version
118+
sdk: [stable]
118119
steps:
119120
- name: checkout
120121
uses: actions/checkout@v4

.github/workflows/min_version_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
with:
5656
flutter-version: "3.24.0"
5757

58-
- uses: ruby/setup-ruby@eaecf785f6a34567a6d97f686bbb7bccc1ac1e5c # pin@v1.237.0
58+
- uses: ruby/setup-ruby@a4effe49ee8ee5b8b5091268c473a4628afb5651 # pin@v1.245.0
5959
with:
6060
ruby-version: '3.1.2' # https://github.com/flutter/flutter/issues/109385#issuecomment-1212614125
6161

.github/workflows/testflight.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- uses: actions/checkout@v4
1717
- uses: subosito/flutter-action@e938fdf56512cc96ef2f93601a5a40bde3801046 # [email protected]
1818
- run: xcodes select 15.0.1
19-
- uses: ruby/setup-ruby@eaecf785f6a34567a6d97f686bbb7bccc1ac1e5c # pin@v1.237.0
19+
- uses: ruby/setup-ruby@a4effe49ee8ee5b8b5091268c473a4628afb5651 # pin@v1.245.0
2020
with:
2121
ruby-version: '2.7.5'
2222
bundler-cache: true

CHANGELOG.md

Lines changed: 140 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,71 @@
66

77
- Sentry Supabase Integration ([#2913](https://github.com/getsentry/sentry-dart/pull/2913))
88
- Adds the `sentry_supabase` package to instrument supabase with Sentry breadcrumbs, traces and errors.
9+
- Add `message` parameter to `captureException()` ([#2882](https://github.com/getsentry/sentry-dart/pull/2882))
910

10-
## 9.0.0-RC.3
11+
## 9.0.0
12+
13+
Version 9.0.0 marks a major release of the Sentry Dart/Flutter SDKs containing breaking changes.
14+
15+
The goal of this release is the following:
16+
- Bump the minimum Dart and Flutter versions to `3.5.0` and `3.24.0` respectively
17+
- Bump the minimum Android API version to 21
18+
- Add interoperability with the Sentry Javascript SDK in Flutter Web for features such as release health and reporting native JS errors
19+
- GA the [Session Replay](https://docs.sentry.io/product/explore/session-replay/) feature
20+
- Provide feature flag support as well as [Firebase Remote Config](https://firebase.google.com/docs/remote-config) support
21+
- Trim down unused and potentially confusing APIs
22+
23+
### How To Upgrade
24+
25+
Please carefully read through the migration guide in the Sentry docs on how to upgrade from version 8 to version 9
26+
- [Dart migration guide](https://docs.sentry.io/platforms/dart/migration/#migrating-from-sentry-8x-to-sentry-9x)
27+
- [Flutter migration guide](https://docs.sentry.io/platforms/dart/guides/flutter/migration/#migrating-from-sentry_flutter-8x-to-sentry_flutter-9x)
28+
29+
### Breaking changes
30+
31+
- Increase minimum SDK version requirements to Dart `v3.5.0` and Flutter `v3.24.0` ([#2643](https://github.com/getsentry/sentry-dart/pull/2643))
32+
- Update naming of `LoadImagesListIntegration` to `LoadNativeDebugImagesIntegration` ([#2833](https://github.com/getsentry/sentry-dart/pull/2833))
33+
- Set sentry-native backend to `crashpad` by default and `breakpad` for Windows ARM64 ([#2791](https://github.com/getsentry/sentry-dart/pull/2791))
34+
- Setting the `SENTRY_NATIVE_BACKEND` environment variable will override the defaults.
35+
- Remove manual TTID implementation ([#2668](https://github.com/getsentry/sentry-dart/pull/2668))
36+
- Remove screenshot option `attachScreenshotOnlyWhenResumed` ([#2664](https://github.com/getsentry/sentry-dart/pull/2664))
37+
- Remove deprecated `beforeScreenshot` ([#2662](https://github.com/getsentry/sentry-dart/pull/2662))
38+
- Remove old user feedback api ([#2686](https://github.com/getsentry/sentry-dart/pull/2686))
39+
- This is replaced by `beforeCaptureScreenshot`
40+
- Remove deprecated loggers ([#2685](https://github.com/getsentry/sentry-dart/pull/2685))
41+
- Remove user segment ([#2687](https://github.com/getsentry/sentry-dart/pull/2687))
42+
- Enable Sentry JS SDK native integration by default ([#2688](https://github.com/getsentry/sentry-dart/pull/2688))
43+
- Remove `enableTracing` ([#2695](https://github.com/getsentry/sentry-dart/pull/2695))
44+
- Remove `options.autoAppStart` and `setAppStartEnd` ([#2680](https://github.com/getsentry/sentry-dart/pull/2680))
45+
- Bump Drift min version to `2.24.0` and use `QueryInterceptor` instead of `QueryExecutor` ([#2679](https://github.com/getsentry/sentry-dart/pull/2679))
46+
- Add hint for transactions ([#2675](https://github.com/getsentry/sentry-dart/pull/2675))
47+
- `BeforeSendTransactionCallback` now has a `Hint` parameter
48+
- Remove `dart:html` usage in favour of `package:web` ([#2710](https://github.com/getsentry/sentry-dart/pull/2710))
49+
- Remove max response body size ([#2709](https://github.com/getsentry/sentry-dart/pull/2709))
50+
- Responses are now only attached if size is below ~0.15mb
51+
- Responses are attached to the `Hint` object, which can be read in `beforeSend`/`beforeSendTransaction` callbacks via `hint.response`.
52+
- For now, only the `dio` integration is supported.
53+
- Enable privacy masking for screenshots by default ([#2728](https://github.com/getsentry/sentry-dart/pull/2728))
54+
- Set option `anrEnabled` to `true` by default (#2878)
55+
- Mutable Data Classes ([#2818](https://github.com/getsentry/sentry-dart/pull/2818))
56+
- Some SDK classes do not have `const` constructors anymore.
57+
- The `copyWith` and `clone` methods of SDK classes were deprecated.
58+
```dart
59+
// old
60+
options.beforeSend = (event, hint) {
61+
event = event.copyWith(release: 'my-release');
62+
return event;
63+
}
64+
// new
65+
options.beforeSend = (event, hint) {
66+
event.release = 'my-release';
67+
return event;
68+
}
69+
```
1170

1271
### Features
1372

14-
- Sentry Structured Logs ([#2919](https://github.com/getsentry/sentry-dart/pull/2919))
73+
- Sentry Structured Logs Beta ([#2919](https://github.com/getsentry/sentry-dart/pull/2919))
1574
- The old `SentryLogger` has been renamed to `SdkLogCallback` and can be accessed through `options.log` now.
1675
- Adds support for structured logging though `Sentry.logger`:
1776
```dart
@@ -27,24 +86,96 @@ Sentry.logger.warn("This is a warning log with attributes.", attributes: {
2786
'bool-attribute': SentryLogAttribute.bool(true),
2887
});
2988
```
89+
- 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))
90+
```dart
91+
// Manually track a feature flag
92+
Sentry.addFeatureFlag('my-feature', true);
3093
31-
### Enhancements
94+
// or use the Sentry Firebase Remote Config Integration (sentry_firebase_remote_config package is required)
95+
// Add the integration to automatically track feature flags from firebase remote config.
96+
await SentryFlutter.init(
97+
(options) {
98+
options.dsn = 'https://[email protected]/add-your-dsn-here';
99+
options.addIntegration(
100+
SentryFirebaseRemoteConfigIntegration(
101+
firebaseRemoteConfig: yourFirebaseRemoteConfig,
102+
),
103+
);
104+
},
105+
);
106+
```
107+
- 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)):
108+
- **With `SentryNavigatorObserver`** - each navigation event starts a new trace.
109+
- **Without `SentryNavigatorObserver` on non-web platforms** - a new trace is started from app
110+
lifecycle hooks.
111+
- **Web without `SentryNavigatorObserver`** - the same trace ID is reused until the page is
112+
refreshed or closed.
113+
- Add support for Flutter Web release health ([#2794](https://github.com/getsentry/sentry-dart/pull/2794))
114+
- Requires using `SentryNavigatorObserver`;
115+
116+
### Behavioral changes
117+
118+
- Set log level to `warning` by default when `debug = true` ([#2836](https://github.com/getsentry/sentry-dart/pull/2836))
119+
- Set HTTP client breadcrumbs log level based on response status code ([#2847](https://github.com/getsentry/sentry-dart/pull/2847))
120+
- 5xx is mapped to `SentryLevel.error`
121+
- 4xx is mapped to `SentryLevel.warning`
122+
- Parent-child relationship for the PlatformExceptions and Cause ([#2803](https://github.com/getsentry/sentry-dart/pull/2803))
123+
- Improves and more accurately represent exception groups
124+
- Disabled by default as it may cause issues to group differently
125+
- You can enable this feature by setting `options.groupException = true`
126+
127+
### Improvements
32128

129+
- Replay: improve Android native interop performance by using JNI ([#2670](https://github.com/getsentry/sentry-dart/pull/2670))
33130
- Align User Feedback API ([#2949](https://github.com/getsentry/sentry-dart/pull/2949))
34131
- Don’t apply breadcrumbs and extras from scope to feedback events
35132
- Capture session replay when processing feedback events
36133
- Record `feedback` client report for dropped feedback events
37134
- Record `feedback` client report for errors when using `HttpTransport`
38135
- Truncate feedback message to max 4096 characters ([#2954](https://github.com/getsentry/sentry-dart/pull/2954))
136+
- Replay: Mask RichText Widgets by default ([#2975](https://github.com/getsentry/sentry-dart/pull/2975))
39137

40138
### Dependencies
41139

42-
- Bump Cocoa SDK from v8.49.2 to v8.51.0 ([#2951](https://github.com/getsentry/sentry-dart/pull/2951))
43-
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8510)
44-
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.49.2...8.51.0)
45-
- Bump Android SDK from v8.11.1 to v8.12.0 ([#2941](https://github.com/getsentry/sentry-dart/pull/2941))
46-
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#8120)
47-
- [diff](https://github.com/getsentry/sentry-java/compare/8.11.1...8.12.0)
140+
- Bump Android SDK from v7.22.4 to v8.12.0 ([#2941](https://github.com/getsentry/sentry-dart/pull/2941), [#2819](https://github.com/getsentry/sentry-dart/pull/2819), [#2831](https://github.com/getsentry/sentry-dart/pull/2831), [#2848](https://github.com/getsentry/sentry-dart/pull/2848), [#2873](https://github.com/getsentry/sentry-dart/pull/2873, [#2883](https://github.com/getsentry/sentry-dart/pull/2883)))
141+
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#890)
142+
- [diff](https://github.com/getsentry/sentry-java/compare/7.22.4...8.9.0)
143+
- Bump Cocoa SDK from v8.46.0 to v8.51.0 ([#2820](https://github.com/getsentry/sentry-dart/pull/2820), [#2851](https://github.com/getsentry/sentry-dart/pull/2851), [#2884](https://github.com/getsentry/sentry-dart/pull/2884), [#2951](https://github.com/getsentry/sentry-dart/pull/2951)))
144+
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8491)
145+
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.46.0...8.49.1)
146+
- Bump Native SDK from v0.8.2 to v0.8.4 ([#2823](https://github.com/getsentry/sentry-dart/pull/2823), [#2872](https://github.com/getsentry/sentry-dart/pull/2872))
147+
- [changelog](https://github.com/getsentry/sentry-native/blob/master/CHANGELOG.md#084)
148+
- [diff](https://github.com/getsentry/sentry-native/compare/0.8.2...0.8.4)
149+
- Bump jni from v0.14.0 to v0.14.1 ([#2800])(https://github.com/getsentry/sentry-dart/pull/2800)
150+
- [changelog](https://github.com/dart-lang/native/blob/main/pkgs/jni/CHANGELOG.md#0141)
151+
- [diff](https://github.com/dart-lang/native/compare/jnigen-v0.14.0..jnigen-v0.14.1)
152+
153+
## 9.0.0-RC.4
154+
155+
### Enhancements
156+
157+
- Replay: Mask RichText Widgets ([#2975](https://github.com/getsentry/sentry-dart/pull/2975))
158+
159+
## 9.0.0-RC.3
160+
161+
### Features
162+
163+
- Sentry Structured Logs ([#2919](https://github.com/getsentry/sentry-dart/pull/2919))
164+
- The old `SentryLogger` has been renamed to `SdkLogCallback` and can be accessed through `options.log` now.
165+
- Adds support for structured logging though `Sentry.logger`:
166+
```dart
167+
// Enable in `SentryOptions`:
168+
options.enableLogs = true;
169+
170+
// Use `Sentry.logger`
171+
Sentry.logger.info("This is a info log.");
172+
Sentry.logger.warn("This is a warning log with attributes.", attributes: {
173+
'string-attribute': SentryLogAttribute.string('string'),
174+
'int-attribute': SentryLogAttribute.int(1),
175+
'double-attribute': SentryLogAttribute.double(1.0),
176+
'bool-attribute': SentryLogAttribute.bool(true),
177+
});
178+
```
48179

49180
## 9.0.0-RC.2
50181

dart/lib/src/hub.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ class Hub {
126126
dynamic throwable, {
127127
dynamic stackTrace,
128128
Hint? hint,
129+
SentryMessage? message,
129130
ScopeCallback? withScope,
130131
}) async {
131132
var sentryId = SentryId.empty();
@@ -154,6 +155,7 @@ class Hub {
154155
var event = SentryEvent(
155156
throwable: throwable,
156157
timestamp: _options.clock(),
158+
message: message,
157159
);
158160

159161
if (_options.isTracingEnabled()) {

dart/lib/src/hub_adapter.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,14 @@ class HubAdapter implements Hub {
5353
dynamic throwable, {
5454
dynamic stackTrace,
5555
Hint? hint,
56+
SentryMessage? message,
5657
ScopeCallback? withScope,
5758
}) =>
5859
Sentry.captureException(
5960
throwable,
6061
stackTrace: stackTrace,
6162
hint: hint,
63+
message: message,
6264
withScope: withScope,
6365
);
6466

dart/lib/src/noop_hub.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ class NoOpHub implements Hub {
4444
dynamic throwable, {
4545
dynamic stackTrace,
4646
Hint? hint,
47+
SentryMessage? message,
4748
ScopeCallback? withScope,
4849
}) async =>
4950
SentryId.empty();

dart/lib/src/recursive_exception_cause_extractor.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class RecursiveExceptionCauseExtractor {
1111

1212
final SentryOptions _options;
1313

14-
List<ExceptionCause> flatten(exception, stackTrace) {
14+
List<ExceptionCause> flatten(dynamic exception, dynamic stackTrace) {
1515
final allExceptionCauses = <ExceptionCause>[];
1616
final circularityDetector = <dynamic>{};
1717

dart/lib/src/sentry.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,13 +221,15 @@ class Sentry {
221221
dynamic throwable, {
222222
dynamic stackTrace,
223223
Hint? hint,
224+
SentryMessage? message,
224225
ScopeCallback? withScope,
225226
}) =>
226227
_taskQueue.enqueue(
227228
() => _hub.captureException(
228229
throwable,
229230
stackTrace: stackTrace,
230231
hint: hint,
232+
message: message,
231233
withScope: withScope,
232234
),
233235
SentryId.empty(),
@@ -416,7 +418,7 @@ class Sentry {
416418
/// // On top of that, you can do your own custom stuff in this callback.
417419
/// });
418420
/// ```
419-
static runZonedGuarded<R>(
421+
static dynamic runZonedGuarded<R>(
420422
R Function() body,
421423
void Function(Object error, StackTrace stack)? onError, {
422424
Map<Object?, Object?>? zoneValues,

dart/lib/src/sentry_baggage.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class SentryBaggage {
9494
}
9595

9696
@internal
97-
setValuesFromScope(Scope scope, SentryOptions options) {
97+
void setValuesFromScope(Scope scope, SentryOptions options) {
9898
final propagationContext = scope.propagationContext;
9999
setTraceId(propagationContext.traceId.toString());
100100
setPublicKey(options.parsedDsn.publicKey);

0 commit comments

Comments
 (0)