Skip to content

Commit ffcfde2

Browse files
authored
Release: Update READMEs for v4 GA (#239)
1 parent dd380f2 commit ffcfde2

File tree

7 files changed

+46
-93
lines changed

7 files changed

+46
-93
lines changed

CHANGELOG.md

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,45 @@
1-
# vNext
1+
# 4.0.0
2+
3+
Release of Sentry's new SDK for Dart/Flutter.
4+
5+
New features not offered by <= v4.0.0:
6+
7+
## Dart SDK
8+
9+
* Sentry's [Unified API](https://develop.sentry.dev/sdk/unified-api/).
10+
* Complete Sentry's [Protocol](https://develop.sentry.dev/sdk/event-payloads/) available.
11+
* [Dart SDK](https://docs.sentry.io/platforms/dart/) docs.
12+
* Automatic [HTTP Breadcrumbs](https://docs.sentry.io/platforms/dart/usage/advanced-usage/#automatic-breadcrumbs) for [http.Client](https://pub.dev/documentation/http/latest/http/Client-class.html)
13+
* No boilerplate for `runZonedGuarded` and `Isolate.current.addErrorListener`
14+
* All events are enriched with [Scope's Contexts](https://develop.sentry.dev/sdk/event-payloads/#scope-interfaces), this includes Breadcrumbs, tags, User, etc...
15+
16+
## Flutter SDK
17+
18+
* The Flutter SDK is built on top of the Dart SDK, so it includes all the available features, plus
19+
* [Flutter SDK](https://docs.sentry.io/platforms/flutter/) docs.
20+
* Automatic [NavigatorObserver Breadcrumbs](https://docs.sentry.io/platforms/flutter/usage/advanced-usage/#automatic-breadcrumbs)
21+
* Automatic [Device's Breadcrumbs](https://docs.sentry.io/platforms/flutter/usage/advanced-usage/#automatic-breadcrumbs) through the Android and iOS SDKs or via Sentry's `WidgetsBindingObserver` wrapper
22+
* No boilerplate for `FlutterError.onError`
23+
* All events are enriched with [Contexts's data](https://develop.sentry.dev/sdk/event-payloads/contexts/), this includes Device's, OS, App info, etc...
24+
* Offline caching
25+
* [Release health](https://docs.sentry.io/product/releases/health/)
26+
* Captures not only Dart and Flutter errors, but also errors caused on the native platforms, Like Kotlin, Java, C and C++ for Android and Swift, ObjC, C, C++ for iOS
27+
* Supports Fatal crashes, Event is going to be sent on App's restart
28+
* Supports `split-debug-info` for Android only
29+
* Flutter Android, iOS and limited support for Flutter Web
30+
31+
Improvements:
232

333
* Feat: Added a copyWith method to all the protocol classes
434

35+
Packages were released on [sentry pubdev](https://pub.dev/packages/sentry) and [sentry_flutter pubdev](https://pub.dev/packages/sentry_flutter)
36+
37+
## Sentry Self Hosted Compatibility
38+
39+
* Since version `4.0.0` of the `sentry_flutter`, [Sentry's version >= v20.6.0](https://github.com/getsentry/onpremise/releases) is required. This only applies to on-premise Sentry, if you are using sentry.io no action is needed.
40+
41+
We'd love to get feedback.
42+
543
# 4.0.0-beta.2
644

745
* Ref: Remove duplicated attachStackTrace field
@@ -71,7 +109,7 @@
71109

72110
First Release of Sentry's new SDK for Dart/Flutter.
73111

74-
New features not offered by <= v3.0.0:
112+
New features not offered by <= v4.0.0:
75113

76114
* Sentry's [Unified API](https://develop.sentry.dev/sdk/unified-api/).
77115
* Complete Sentry [Protocol](https://develop.sentry.dev/sdk/event-payloads/) available.

README.md

Lines changed: 1 addition & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -20,88 +20,9 @@ command-line/server Dart VM, and `AngularDart`.
2020

2121
Versions below `3.0.1` are deprecated.
2222

23-
###### Preleases (v4.0.0)
24-
25-
- If you wish to try out our Prelease versions, check out the inner [dart](https://github.com/getsentry/sentry-dart/tree/main/dart) and [flutter](https://github.com/getsentry/sentry-dart/tree/main/flutter) folders.
26-
2723
##### Usage
2824

29-
Sign up for a Sentry.io account and get a DSN at http://sentry.io.
30-
31-
Add `sentry` dependency to your `pubspec.yaml`:
32-
33-
```yaml
34-
dependencies:
35-
sentry: ">=3.0.1 <4.0.0"
36-
```
37-
38-
In your Dart code, import `package:sentry/sentry.dart` and create a `SentryClient` using the DSN issued by Sentry.io:
39-
40-
```dart
41-
import 'package:sentry/sentry.dart';
42-
43-
final SentryClient sentry = new SentryClient(dsn: YOUR_DSN);
44-
```
45-
46-
In an exception handler, call `captureException()`:
47-
48-
```dart
49-
main() async {
50-
try {
51-
doSomethingThatMightThrowAnError();
52-
} catch(error, stackTrace) {
53-
await sentry.captureException(
54-
exception: error,
55-
stackTrace: stackTrace,
56-
);
57-
}
58-
}
59-
```
60-
61-
##### Tips for catching errors
62-
63-
- Use a `try/catch` block, like in the example above.
64-
- Create a `Zone` with an error handler, e.g. using `runZonedGuarded`.
65-
66-
```dart
67-
var sentry = SentryClient(dsn: "https://...");
68-
// Run the whole app in a zone to capture all uncaught errors.
69-
runZonedGuarded(
70-
() => runApp(MyApp()),
71-
(error, stackTrace) async {
72-
try {
73-
sentry.captureException(
74-
exception: error,
75-
stackTrace: stackTrace,
76-
);
77-
print('Error sent to sentry.io: $error');
78-
} catch (e) {
79-
print('Sending report to sentry.io failed: $e');
80-
print('Original error: $error');
81-
}
82-
},
83-
);
84-
```
85-
- For Flutter-specific errors (such as layout failures), use `FlutterError.onError`. For example:
86-
87-
```dart
88-
var sentry = SentryClient(dsn: "https://...");
89-
FlutterError.onError = (details, {bool forceReport = false}) {
90-
try {
91-
sentry.captureException(
92-
exception: details.exception,
93-
stackTrace: details.stack,
94-
);
95-
} catch (e) {
96-
print('Sending report to sentry.io failed: $e');
97-
} finally {
98-
// Also use Flutter's pretty error logging to the device's console.
99-
FlutterError.dumpErrorToConsole(details, forceReport: forceReport);
100-
}
101-
};
102-
```
103-
- Use `Isolate.current.addErrorListener` to capture uncaught errors
104-
in the root zone.
25+
For detailed usage, check out the inner [dart](https://github.com/getsentry/sentry-dart/tree/main/dart) and [flutter](https://github.com/getsentry/sentry-dart/tree/main/flutter) `README's` or our `Resources` section below.
10526

10627
#### Resources
10728

dart/README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,6 @@ Pure Dart SDK used by any Dart application like AngularDart, CLI and server.
1919
For Flutter applications there's [`sentry_flutter`](https://pub.dev/packages/sentry_flutter) which builds on top of this package.
2020
That will give you native crash support (for Android and iOS), [release health](https://docs.sentry.io/product/releases/health/), offline caching and more.
2121

22-
#### Versions
23-
24-
Versions `^4.0.0-alpha.1` are `Prereleases` and are under improvements/testing.
25-
26-
The current stable version is the Dart SDK, [3.0.1](https://pub.dev/packages/sentry).
27-
2822
#### Usage
2923

3024
- Sign up for a Sentry.io account and get a DSN at http://sentry.io.

dart/lib/src/version.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ library version;
1111
import 'utils.dart';
1212

1313
/// The SDK version reported to Sentry.io in the submitted events.
14-
const String sdkVersion = '4.0.0-beta.3';
14+
const String sdkVersion = '4.0.0';
1515

1616
String get sdkName => isWeb ? _browserSdkName : _ioSdkName;
1717

dart/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: sentry
2-
version: 4.0.0-beta.3
2+
version: 4.0.0
33
description: >
44
A crash reporting library for Dart that sends crash reports to Sentry.io.
55
This library supports Dart VM and Web. For Flutter consider sentry_flutter instead.

flutter/lib/src/version.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/// The SDK version reported to Sentry.io in the submitted events.
2-
const String sdkVersion = '4.0.0-beta.3';
2+
const String sdkVersion = '4.0.0';
33

44
/// The default SDK name reported to Sentry.io in the submitted events.
55
const String sdkName = 'sentry.dart.flutter';

flutter/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: sentry_flutter
2-
version: 4.0.0-beta.3
2+
version: 4.0.0
33
description: Sentry SDK for Flutter. This package aims to support different Flutter targets by relying on the many platforms supported by Sentry with native SDKs.
44
homepage: https://docs.sentry.io/platforms/flutter/
55
repository: https://github.com/getsentry/sentry-dart
@@ -13,7 +13,7 @@ dependencies:
1313
sdk: flutter
1414
flutter_web_plugins:
1515
sdk: flutter
16-
sentry: ">=4.0.0-beta.3 <4.1.0"
16+
sentry: ">=4.0.0 <5.0.0"
1717
package_info: ^0.4.0
1818

1919
dev_dependencies:

0 commit comments

Comments
 (0)