From e6b3274e837f3a06e964869d8c1ecda17ffcc454 Mon Sep 17 00:00:00 2001 From: Manoel Aranda Neto Date: Wed, 28 Oct 2020 15:25:31 +0100 Subject: [PATCH 01/10] Bump sentry sdk to 4.0.0-alpha.1 --- .github/workflows/dart.yml | 3 +-- CHANGELOG.md | 2 +- dart/lib/src/version.dart | 2 +- dart/pubspec.yaml | 2 +- flutter/example/lib/main.dart | 1 + 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index f12f4ecc90..1aad8a7064 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -53,10 +53,9 @@ jobs: env: TOTAL: ${{ steps.analysis.outputs.total }} TOTAL_MAX: ${{ steps.analysis.outputs.total_max }} - # TODO: Once 4.0.0 lands, change to 100 run: | PERCENTAGE=$(( $TOTAL * 100 / $TOTAL_MAX )) - if (( $PERCENTAGE < 90 )) + if (( $PERCENTAGE < 100 )) then echo Score too low! exit 1 diff --git a/CHANGELOG.md b/CHANGELOG.md index a3399e38b8..eeae14eaa8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # `package:sentry` and `package:sentry-flutter` changelog -## 4.0.0 +## 4.0.0-alpha.1 - BREAKING CHANGE: Fixed context screenDensity is of type double #53 - BREAKING CHANGE: Fixed context screenDpi is of type int #58 diff --git a/dart/lib/src/version.dart b/dart/lib/src/version.dart index 820cd11bdf..487efeaa8a 100644 --- a/dart/lib/src/version.dart +++ b/dart/lib/src/version.dart @@ -11,7 +11,7 @@ library version; import 'utils.dart'; /// The SDK version reported to Sentry.io in the submitted events. -const String sdkVersion = '4.0.0'; +const String sdkVersion = '4.0.0-alpha.1'; String get sdkName => isWeb ? _browserSdkName : _ioSdkName; diff --git a/dart/pubspec.yaml b/dart/pubspec.yaml index b1bb5988e6..0060ea021b 100644 --- a/dart/pubspec.yaml +++ b/dart/pubspec.yaml @@ -1,5 +1,5 @@ name: sentry -version: 4.0.0 +version: 4.0.0-alpha.1 description: > A crash reporting library for Dart that sends crash reports to Sentry.io. This library supports Dart Native, and Flutter for mobile, web, and desktop. diff --git a/flutter/example/lib/main.dart b/flutter/example/lib/main.dart index 7c9dc8f024..c47a6eb100 100644 --- a/flutter/example/lib/main.dart +++ b/flutter/example/lib/main.dart @@ -11,6 +11,7 @@ import 'package:universal_platform/universal_platform.dart'; const String _release = String.fromEnvironment('SENTRY_RELEASE', defaultValue: 'unknown'); +// Change the DSN const String exampleDsn = 'https://cb0fad6f5d4e42ebb9c956cb0463edc9@o447951.ingest.sentry.io/5428562'; From 968b987841d87d39e36d9f0782a27eee78414bfa Mon Sep 17 00:00:00 2001 From: Manoel Aranda Neto Date: Wed, 28 Oct 2020 15:36:43 +0100 Subject: [PATCH 02/10] readme --- README.md | 75 ++++++++++++++++++++++++------------------------------- 1 file changed, 33 insertions(+), 42 deletions(-) diff --git a/README.md b/README.md index 5c792aaf8e..430de0bae4 100644 --- a/README.md +++ b/README.md @@ -52,29 +52,24 @@ Add `sentry` dependency to your `pubspec.yaml`: ```yaml dependencies: - sentry: ">=3.0.1 <4.0.0" + sentry: ^4.0.0 ``` -In your Dart code, import `package:sentry/sentry.dart` and create a `SentryClient` using the DSN issued by Sentry.io: +In your Dart code, import `package:sentry/sentry.dart` and `Sentry.init(...)` using the DSN issued by Sentry.io: ```dart import 'package:sentry/sentry.dart'; -final SentryClient sentry = new SentryClient(dsn: YOUR_DSN); +Sentry.init((options) => options.dsn = '___PUBLIC_DSN___'); ``` In an exception handler, call `captureException()`: ```dart -main() async { - try { - doSomethingThatMightThrowAnError(); - } catch(error, stackTrace) { - await sentry.captureException( - exception: error, - stackTrace: stackTrace, - ); - } +try { + aMethodThatMightFail(); +} catch (exception, stackTrace) { + Sentry.captureException(exception, stackTrace: stackTrace); } ``` @@ -83,43 +78,39 @@ main() async { - Use a `try/catch` block, like in the example above. - Create a `Zone` with an error handler, e.g. using [runZonedGuarded][run_zoned_guarded]. - ```dart - var sentry = SentryClient(dsn: "https://..."); - // Run the whole app in a zone to capture all uncaught errors. +```dart +import 'dart:async'; +import 'package:sentry/sentry.dart'; + +// Wrap your 'runApp(MyApp())' as follows: + +void main() async { runZonedGuarded( () => runApp(MyApp()), (error, stackTrace) { - try { - sentry.captureException( - exception: error, - stackTrace: stackTrace, - ); - print('Error sent to sentry.io: $error'); - } catch (e) { - print('Sending report to sentry.io failed: $e'); - print('Original error: $error'); - } + Sentry.captureException( + exception: error, + stackTrace: stackTrace, + ); }, ); - ``` +} +``` + - For Flutter-specific errors (such as layout failures), use [FlutterError.onError][flutter_error]. For example: - ```dart - var sentry = SentryClient(dsn: "https://..."); - FlutterError.onError = (details, {bool forceReport = false}) { - try { - sentry.captureException( - exception: details.exception, - stackTrace: details.stack, - ); - } catch (e) { - print('Sending report to sentry.io failed: $e'); - } finally { - // Also use Flutter's pretty error logging to the device's console. - FlutterError.dumpErrorToConsole(details, forceReport: forceReport); - } - }; - ``` +```dart +import 'package:flutter/foundation.dart'; +import 'package:sentry/sentry.dart'; + +FlutterError.onError = (details, {bool forceReport = false}) { + Sentry.captureException( + exception: details.exception, + stackTrace: details.stack, + ); +}; +``` + - Use `Isolate.current.addErrorListener` to capture uncaught errors in the root zone. From 74c8ff619cc0179cf52ec820709b8b7b8188dd1d Mon Sep 17 00:00:00 2001 From: Manoel Aranda Neto Date: Wed, 28 Oct 2020 15:39:00 +0100 Subject: [PATCH 03/10] fix dsn message --- dart/example/main.dart | 2 +- dart/example_web/web/main.dart | 2 +- flutter/example/lib/main.dart | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dart/example/main.dart b/dart/example/main.dart index 1bade23828..aabcf2ea54 100644 --- a/dart/example/main.dart +++ b/dart/example/main.dart @@ -10,7 +10,7 @@ import 'event_example.dart'; /// Sends a test exception report to Sentry.io using this Dart client. Future main() async { - // Change the DSN + // ATTENTION: Change the DSN below with your own to see the events in Sentry. Get one at sentry.io const dsn = 'https://cb0fad6f5d4e42ebb9c956cb0463edc9@o447951.ingest.sentry.io/5428562'; diff --git a/dart/example_web/web/main.dart b/dart/example_web/web/main.dart index 5377e5f448..1d25121f17 100644 --- a/dart/example_web/web/main.dart +++ b/dart/example_web/web/main.dart @@ -5,7 +5,7 @@ import 'package:sentry/sentry.dart'; import 'event.dart'; -// Change the DSN +// ATTENTION: Change the DSN below with your own to see the events in Sentry. Get one at sentry.io const dsn = 'https://cb0fad6f5d4e42ebb9c956cb0463edc9@o447951.ingest.sentry.io/5428562'; diff --git a/flutter/example/lib/main.dart b/flutter/example/lib/main.dart index c47a6eb100..c0048ba2bf 100644 --- a/flutter/example/lib/main.dart +++ b/flutter/example/lib/main.dart @@ -11,7 +11,7 @@ import 'package:universal_platform/universal_platform.dart'; const String _release = String.fromEnvironment('SENTRY_RELEASE', defaultValue: 'unknown'); -// Change the DSN +// ATTENTION: Change the DSN below with your own to see the events in Sentry. Get one at sentry.io const String exampleDsn = 'https://cb0fad6f5d4e42ebb9c956cb0463edc9@o447951.ingest.sentry.io/5428562'; From 267085694678707ada214c325fedcfa9ffb82544 Mon Sep 17 00:00:00 2001 From: Manoel Aranda Neto <5731772+marandaneto@users.noreply.github.com> Date: Wed, 28 Oct 2020 15:41:46 +0100 Subject: [PATCH 04/10] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 430de0bae4..73b84cd583 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ void main() async { runZonedGuarded( () => runApp(MyApp()), (error, stackTrace) { - Sentry.captureException( + await Sentry.captureException( exception: error, stackTrace: stackTrace, ); From eeea266c66d52b24f77abf4dd32dbe9779fdeb49 Mon Sep 17 00:00:00 2001 From: Manoel Aranda Neto <5731772+marandaneto@users.noreply.github.com> Date: Wed, 28 Oct 2020 15:55:50 +0100 Subject: [PATCH 05/10] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 73b84cd583..d7078ee431 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ dependencies: sentry: ^4.0.0 ``` -In your Dart code, import `package:sentry/sentry.dart` and `Sentry.init(...)` using the DSN issued by Sentry.io: +In your Dart code, import `package:sentry/sentry.dart` and initialize the Sentry SDK using the DSN issued by Sentry.io: ```dart import 'package:sentry/sentry.dart'; From 61304a54e349178fea81b2ef09386ab25a2a6e76 Mon Sep 17 00:00:00 2001 From: Manoel Aranda Neto Date: Wed, 28 Oct 2020 16:08:40 +0100 Subject: [PATCH 06/10] update readme --- README.md | 57 +++++++++++++++++++++------------ dart/lib/src/protocol/test.dart | 24 ++++++++++++++ flutter/example/lib/test.dart | 22 +++++++++++++ 3 files changed, 82 insertions(+), 21 deletions(-) create mode 100644 dart/lib/src/protocol/test.dart create mode 100644 flutter/example/lib/test.dart diff --git a/README.md b/README.md index 430de0bae4..85c79df585 100644 --- a/README.md +++ b/README.md @@ -66,10 +66,18 @@ Sentry.init((options) => options.dsn = '___PUBLIC_DSN___'); In an exception handler, call `captureException()`: ```dart -try { - aMethodThatMightFail(); -} catch (exception, stackTrace) { - Sentry.captureException(exception, stackTrace: stackTrace); +import 'dart:async'; +import 'package:sentry/sentry.dart'; + +void main() async { + try { + aMethodThatMightFail(); + } catch (exception, stackTrace) { + await Sentry.captureException( + exception, + stackTrace: stackTrace, + ); + } } ``` @@ -80,35 +88,42 @@ try { ```dart import 'dart:async'; + +import 'package:flutter/material.dart'; + import 'package:sentry/sentry.dart'; // Wrap your 'runApp(MyApp())' as follows: -void main() async { - runZonedGuarded( - () => runApp(MyApp()), - (error, stackTrace) { - Sentry.captureException( - exception: error, - stackTrace: stackTrace, - ); - }, - ); +Future main() async { + runZonedGuarded>(() async { + runApp(MyApp()); + }, (exception, stackTrace) async { + await Sentry.captureException( + exception, + stackTrace: stackTrace, + ); + }); } ``` - For Flutter-specific errors (such as layout failures), use [FlutterError.onError][flutter_error]. For example: ```dart -import 'package:flutter/foundation.dart'; +import 'dart:async'; +import 'package:flutter/material.dart'; import 'package:sentry/sentry.dart'; -FlutterError.onError = (details, {bool forceReport = false}) { - Sentry.captureException( - exception: details.exception, - stackTrace: details.stack, - ); -}; +// Wrap your 'runApp(MyApp())' as follows: + +Future main() async { + FlutterError.onError = (FlutterErrorDetails details) async { + await Sentry.captureException( + details.exception, + stackTrace: details.stack, + ); + }; +} ``` - Use `Isolate.current.addErrorListener` to capture uncaught errors diff --git a/dart/lib/src/protocol/test.dart b/dart/lib/src/protocol/test.dart new file mode 100644 index 0000000000..cf4a128b8d --- /dev/null +++ b/dart/lib/src/protocol/test.dart @@ -0,0 +1,24 @@ +import 'dart:async'; +import 'package:sentry/sentry.dart'; + +// Wrap your 'runApp(MyApp())' as follows: + +void main() async { + runZonedGuarded( + () => runApp(MyApp()), + (error, stackTrace) { + Sentry.captureException( + exception: error, + stackTrace: stackTrace, + ); + }, + ); + } + + +} + +class MyApp { + runApp(MyApp myApp) { + } +} diff --git a/flutter/example/lib/test.dart b/flutter/example/lib/test.dart new file mode 100644 index 0000000000..a272be65b3 --- /dev/null +++ b/flutter/example/lib/test.dart @@ -0,0 +1,22 @@ +import 'dart:async'; +import 'package:flutter/material.dart'; +import 'package:sentry/sentry.dart'; + +// Wrap your 'runApp(MyApp())' as follows: + +Future main() async { + FlutterError.onError = (FlutterErrorDetails details) async { + await Sentry.captureException( + details.exception, + stackTrace: details.stack, + ); + }; +} + +class MyApp extends StatefulWidget { + @override + State createState() { + // TODO: implement createState + throw UnimplementedError(); + } +} From b7a74dd71483e767dc43acde766b55418f208910 Mon Sep 17 00:00:00 2001 From: Manoel Aranda Neto Date: Wed, 28 Oct 2020 16:09:10 +0100 Subject: [PATCH 07/10] remove wrong file --- flutter/example/lib/test.dart | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 flutter/example/lib/test.dart diff --git a/flutter/example/lib/test.dart b/flutter/example/lib/test.dart deleted file mode 100644 index a272be65b3..0000000000 --- a/flutter/example/lib/test.dart +++ /dev/null @@ -1,22 +0,0 @@ -import 'dart:async'; -import 'package:flutter/material.dart'; -import 'package:sentry/sentry.dart'; - -// Wrap your 'runApp(MyApp())' as follows: - -Future main() async { - FlutterError.onError = (FlutterErrorDetails details) async { - await Sentry.captureException( - details.exception, - stackTrace: details.stack, - ); - }; -} - -class MyApp extends StatefulWidget { - @override - State createState() { - // TODO: implement createState - throw UnimplementedError(); - } -} From e3cc798a993bef4a09fe2a13e907cc79cf3bf4cd Mon Sep 17 00:00:00 2001 From: Manoel Aranda Neto Date: Wed, 28 Oct 2020 16:12:39 +0100 Subject: [PATCH 08/10] remove wrong file --- dart/lib/src/protocol/test.dart | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 dart/lib/src/protocol/test.dart diff --git a/dart/lib/src/protocol/test.dart b/dart/lib/src/protocol/test.dart deleted file mode 100644 index cf4a128b8d..0000000000 --- a/dart/lib/src/protocol/test.dart +++ /dev/null @@ -1,24 +0,0 @@ -import 'dart:async'; -import 'package:sentry/sentry.dart'; - -// Wrap your 'runApp(MyApp())' as follows: - -void main() async { - runZonedGuarded( - () => runApp(MyApp()), - (error, stackTrace) { - Sentry.captureException( - exception: error, - stackTrace: stackTrace, - ); - }, - ); - } - - -} - -class MyApp { - runApp(MyApp myApp) { - } -} From 2efe1ca23277687529b01d08b84b9aca3573316f Mon Sep 17 00:00:00 2001 From: Manoel Aranda Neto Date: Wed, 28 Oct 2020 16:41:03 +0100 Subject: [PATCH 09/10] fix readme --- README.md | 104 +++++++++++++++++++++++-------------------------- dart/README.md | 96 ++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 144 insertions(+), 56 deletions(-) mode change 120000 => 100644 dart/README.md diff --git a/README.md b/README.md index c467588834..d56bb3acba 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,8 @@ We also run CI against the Flutter `stable` and `beta` channels so you should be ##### Versions -Versions `3.0.1` and higher support [Flutter][flutter] (mobile, web, desktop), -command-line/server Dart VM, and [AngularDart][angular_sentry]. +Versions `3.0.1` and higher support `Flutter` (mobile, web, desktop), +command-line/server Dart VM, and `AngularDart`. Versions below `3.0.1` are deprecated. @@ -52,29 +52,26 @@ Add `sentry` dependency to your `pubspec.yaml`: ```yaml dependencies: - sentry: ^4.0.0 + sentry: ">=3.0.1 <4.0.0" ``` -In your Dart code, import `package:sentry/sentry.dart` and initialize the Sentry SDK using the DSN issued by Sentry.io: +In your Dart code, import `package:sentry/sentry.dart` and create a `SentryClient` using the DSN issued by Sentry.io: ```dart import 'package:sentry/sentry.dart'; -Sentry.init((options) => options.dsn = '___PUBLIC_DSN___'); +final SentryClient sentry = new SentryClient(dsn: YOUR_DSN); ``` In an exception handler, call `captureException()`: ```dart -import 'dart:async'; -import 'package:sentry/sentry.dart'; - -void main() async { +main() async { try { - aMethodThatMightFail(); - } catch (exception, stackTrace) { - await Sentry.captureException( - exception, + doSomethingThatMightThrowAnError(); + } catch(error, stackTrace) { + await sentry.captureException( + exception: error, stackTrace: stackTrace, ); } @@ -84,48 +81,45 @@ void main() async { ##### Tips for catching errors - Use a `try/catch` block, like in the example above. -- Create a `Zone` with an error handler, e.g. using [runZonedGuarded][run_zoned_guarded]. - -```dart -import 'dart:async'; - -import 'package:flutter/material.dart'; - -import 'package:sentry/sentry.dart'; - -// Wrap your 'runApp(MyApp())' as follows: - -Future main() async { - runZonedGuarded>(() async { - runApp(MyApp()); - }, (exception, stackTrace) async { - await Sentry.captureException( - exception, - stackTrace: stackTrace, - ); - }); -} -``` - -- For Flutter-specific errors (such as layout failures), use [FlutterError.onError][flutter_error]. For example: - -```dart -import 'dart:async'; -import 'package:flutter/material.dart'; -import 'package:sentry/sentry.dart'; - -// Wrap your 'runApp(MyApp())' as follows: - -Future main() async { - FlutterError.onError = (FlutterErrorDetails details) async { - await Sentry.captureException( - details.exception, - stackTrace: details.stack, - ); +- Create a `Zone` with an error handler, e.g. using `runZonedGuarded`. + + ```dart + var sentry = SentryClient(dsn: "https://..."); + // Run the whole app in a zone to capture all uncaught errors. + runZonedGuarded( + () => runApp(MyApp()), + (error, stackTrace) { + try { + sentry.captureException( + exception: error, + stackTrace: stackTrace, + ); + print('Error sent to sentry.io: $error'); + } catch (e) { + print('Sending report to sentry.io failed: $e'); + print('Original error: $error'); + } + }, + ); + ``` +- For Flutter-specific errors (such as layout failures), use `FlutterError.onError`. For example: + + ```dart + var sentry = SentryClient(dsn: "https://..."); + FlutterError.onError = (details, {bool forceReport = false}) { + try { + sentry.captureException( + exception: details.exception, + stackTrace: details.stack, + ); + } catch (e) { + print('Sending report to sentry.io failed: $e'); + } finally { + // Also use Flutter's pretty error logging to the device's console. + FlutterError.dumpErrorToConsole(details, forceReport: forceReport); + } }; -} -``` - + ``` - Use `Isolate.current.addErrorListener` to capture uncaught errors in the root zone. @@ -135,4 +129,4 @@ Future main() async { * [![Forum](https://img.shields.io/badge/forum-sentry-green.svg)](https://forum.sentry.io/c/sdks) * [![Discord](https://img.shields.io/discord/621778831602221064)](https://discord.gg/Ww9hbqr) * [![Stack Overflow](https://img.shields.io/badge/stack%20overflow-sentry-green.svg)](https://stackoverflow.com/questions/tagged/sentry) -* [![Twitter Follow](https://img.shields.io/twitter/follow/getsentry?label=getsentry&style=social)](https://twitter.com/intent/follow?screen_name=getsentry) +* [![Twitter Follow](https://img.shields.io/twitter/follow/getsentry?label=getsentry&style=social)](https://twitter.com/intent/follow?screen_name=getsentry) \ No newline at end of file diff --git a/dart/README.md b/dart/README.md deleted file mode 120000 index 32d46ee883..0000000000 --- a/dart/README.md +++ /dev/null @@ -1 +0,0 @@ -../README.md \ No newline at end of file diff --git a/dart/README.md b/dart/README.md new file mode 100644 index 0000000000..85c485d80c --- /dev/null +++ b/dart/README.md @@ -0,0 +1,95 @@ +

+ + + +
+

+ +Sentry SDK for Dart and Flutter +=========== + +##### Usage + +Sign up for a Sentry.io account and get a DSN at http://sentry.io. + +In your Dart code, import `package:sentry/sentry.dart` and initialize the Sentry SDK using the DSN issued by Sentry.io: + +```dart +import 'package:sentry/sentry.dart'; + +Sentry.init((options) => options.dsn = '___PUBLIC_DSN___'); +``` + +In an exception handler, call `captureException()`: + +```dart +import 'dart:async'; +import 'package:sentry/sentry.dart'; + +void main() async { + try { + aMethodThatMightFail(); + } catch (exception, stackTrace) { + await Sentry.captureException( + exception, + stackTrace: stackTrace, + ); + } +} +``` + +##### Tips for catching errors + +- Use a `try/catch` block, like in the example above. +- Create a `Zone` with an error handler, e.g. using `runZonedGuarded`. + +```dart +import 'dart:async'; + +import 'package:flutter/material.dart'; + +import 'package:sentry/sentry.dart'; + +// Wrap your 'runApp(MyApp())' as follows: + +Future main() async { + runZonedGuarded>(() async { + runApp(MyApp()); + }, (exception, stackTrace) async { + await Sentry.captureException( + exception, + stackTrace: stackTrace, + ); + }); +} +``` + +- For Flutter-specific errors (such as layout failures), use `FlutterError.onError`. For example: + +```dart +import 'dart:async'; +import 'package:flutter/material.dart'; +import 'package:sentry/sentry.dart'; + +// Wrap your 'runApp(MyApp())' as follows: + +Future main() async { + FlutterError.onError = (FlutterErrorDetails details) async { + await Sentry.captureException( + details.exception, + stackTrace: details.stack, + ); + }; +} +``` + +- Use `Isolate.current.addErrorListener` to capture uncaught errors + in the root zone. + +#### Resources + +* [![Documentation](https://img.shields.io/badge/documentation-sentry.io-green.svg)](https://docs.sentry.io/platforms/flutter/) +* [![Forum](https://img.shields.io/badge/forum-sentry-green.svg)](https://forum.sentry.io/c/sdks) +* [![Discord](https://img.shields.io/discord/621778831602221064)](https://discord.gg/Ww9hbqr) +* [![Stack Overflow](https://img.shields.io/badge/stack%20overflow-sentry-green.svg)](https://stackoverflow.com/questions/tagged/sentry) +* [![Twitter Follow](https://img.shields.io/twitter/follow/getsentry?label=getsentry&style=social)](https://twitter.com/intent/follow?screen_name=getsentry) From 665d9e876f070e48024883c589f3ec134ed864aa Mon Sep 17 00:00:00 2001 From: Manoel Aranda Neto Date: Wed, 28 Oct 2020 16:43:02 +0100 Subject: [PATCH 10/10] fix dsn --- dart/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dart/README.md b/dart/README.md index 85c485d80c..f1faa6003b 100644 --- a/dart/README.md +++ b/dart/README.md @@ -17,7 +17,7 @@ In your Dart code, import `package:sentry/sentry.dart` and initialize the Sentry ```dart import 'package:sentry/sentry.dart'; -Sentry.init((options) => options.dsn = '___PUBLIC_DSN___'); +Sentry.init((options) => options.dsn = 'https://example@sentry.io/add-your-dsn-here'); ``` In an exception handler, call `captureException()`: