diff --git a/src/includes/breadcrumbs/automatic-breadcrumbs/_default.mdx b/src/includes/breadcrumbs/automatic-breadcrumbs/_default.mdx new file mode 100644 index 0000000000000..38e71cc6745a8 --- /dev/null +++ b/src/includes/breadcrumbs/automatic-breadcrumbs/_default.mdx @@ -0,0 +1 @@ +SDKs and their associated integrations will automatically record many types of breadcrumbs. For instance, the browser JavaScript SDK will automatically record all location changes. diff --git a/src/includes/breadcrumbs/automatic-breadcrumbs/flutter.mdx b/src/includes/breadcrumbs/automatic-breadcrumbs/flutter.mdx new file mode 100644 index 0000000000000..2aa7833b942cc --- /dev/null +++ b/src/includes/breadcrumbs/automatic-breadcrumbs/flutter.mdx @@ -0,0 +1,20 @@ +The Flutter SDK already captures breadcrumbs automatically via the Native SDKs. + +- [Automatic Breadcrumbs for Android](/platforms/android/enriching-events/breadcrumbs/#automatic-breadcrumbs) +- [Automatic Breadcrumbs for iOS](/platforms/apple/usage/#sentryautobreadcrumbtrackingintegration) + +If you wish to add additional Navigation breadcrumbs for Flutter Apps, Add the `SentryNavigatorObserver` to your `MaterialApp`, `WidgetsApp` or `CupertinoApp` + +```dart +import 'package:flutter/material.dart'; +import 'package:sentry_flutter/sentry_flutter.dart'; + +MaterialApp( + navigatorObservers: [ + SentryNavigatorObserver(), + ], + // other parameters +) +``` + +To track automatic Breadcrumbs for `HTTP` requests, Check out the [SentryHttpClient](/platforms/dart/usage/advanced-usage/#automatic-breadcrumbs) Wrapper for the [http](https://pub.dev/packages/http) library. diff --git a/src/includes/before-breadcrumb/android.mdx b/src/includes/breadcrumbs/before-breadcrumb/android.mdx similarity index 100% rename from src/includes/before-breadcrumb/android.mdx rename to src/includes/breadcrumbs/before-breadcrumb/android.mdx diff --git a/src/includes/before-breadcrumb/apple.mdx b/src/includes/breadcrumbs/before-breadcrumb/apple.mdx similarity index 100% rename from src/includes/before-breadcrumb/apple.mdx rename to src/includes/breadcrumbs/before-breadcrumb/apple.mdx diff --git a/src/includes/before-breadcrumb/dart.mdx b/src/includes/breadcrumbs/before-breadcrumb/dart.mdx similarity index 100% rename from src/includes/before-breadcrumb/dart.mdx rename to src/includes/breadcrumbs/before-breadcrumb/dart.mdx diff --git a/src/includes/before-breadcrumb/dotnet.mdx b/src/includes/breadcrumbs/before-breadcrumb/dotnet.mdx similarity index 100% rename from src/includes/before-breadcrumb/dotnet.mdx rename to src/includes/breadcrumbs/before-breadcrumb/dotnet.mdx diff --git a/src/includes/before-breadcrumb/dotnet.xamarin.mdx b/src/includes/breadcrumbs/before-breadcrumb/dotnet.xamarin.mdx similarity index 98% rename from src/includes/before-breadcrumb/dotnet.xamarin.mdx rename to src/includes/breadcrumbs/before-breadcrumb/dotnet.xamarin.mdx index 8092fd53b96e2..5c8d57c299c18 100644 --- a/src/includes/before-breadcrumb/dotnet.xamarin.mdx +++ b/src/includes/breadcrumbs/before-breadcrumb/dotnet.xamarin.mdx @@ -9,4 +9,4 @@ SentryXamarin.Init(options => ? null : breadcrumb; }); -``` \ No newline at end of file +``` diff --git a/src/includes/before-breadcrumb/go.mdx b/src/includes/breadcrumbs/before-breadcrumb/go.mdx similarity index 100% rename from src/includes/before-breadcrumb/go.mdx rename to src/includes/breadcrumbs/before-breadcrumb/go.mdx diff --git a/src/includes/before-breadcrumb/java.mdx b/src/includes/breadcrumbs/before-breadcrumb/java.mdx similarity index 100% rename from src/includes/before-breadcrumb/java.mdx rename to src/includes/breadcrumbs/before-breadcrumb/java.mdx diff --git a/src/includes/before-breadcrumb/javascript.mdx b/src/includes/breadcrumbs/before-breadcrumb/javascript.mdx similarity index 100% rename from src/includes/before-breadcrumb/javascript.mdx rename to src/includes/breadcrumbs/before-breadcrumb/javascript.mdx diff --git a/src/includes/before-breadcrumb/native.mdx b/src/includes/breadcrumbs/before-breadcrumb/native.mdx similarity index 100% rename from src/includes/before-breadcrumb/native.mdx rename to src/includes/breadcrumbs/before-breadcrumb/native.mdx diff --git a/src/includes/before-breadcrumb/php.laravel.mdx b/src/includes/breadcrumbs/before-breadcrumb/php.laravel.mdx similarity index 100% rename from src/includes/before-breadcrumb/php.laravel.mdx rename to src/includes/breadcrumbs/before-breadcrumb/php.laravel.mdx diff --git a/src/includes/before-breadcrumb/php.mdx b/src/includes/breadcrumbs/before-breadcrumb/php.mdx similarity index 100% rename from src/includes/before-breadcrumb/php.mdx rename to src/includes/breadcrumbs/before-breadcrumb/php.mdx diff --git a/src/includes/before-breadcrumb/python.mdx b/src/includes/breadcrumbs/before-breadcrumb/python.mdx similarity index 100% rename from src/includes/before-breadcrumb/python.mdx rename to src/includes/breadcrumbs/before-breadcrumb/python.mdx diff --git a/src/includes/before-breadcrumb/ruby.mdx b/src/includes/breadcrumbs/before-breadcrumb/ruby.mdx similarity index 100% rename from src/includes/before-breadcrumb/ruby.mdx rename to src/includes/breadcrumbs/before-breadcrumb/ruby.mdx diff --git a/src/includes/breadcrumbs-example/apple.mdx b/src/includes/breadcrumbs/breadcrumbs-example/apple.mdx similarity index 100% rename from src/includes/breadcrumbs-example/apple.mdx rename to src/includes/breadcrumbs/breadcrumbs-example/apple.mdx diff --git a/src/includes/breadcrumbs-example/dart.mdx b/src/includes/breadcrumbs/breadcrumbs-example/dart.mdx similarity index 100% rename from src/includes/breadcrumbs-example/dart.mdx rename to src/includes/breadcrumbs/breadcrumbs-example/dart.mdx diff --git a/src/includes/breadcrumbs-example/dotnet.mdx b/src/includes/breadcrumbs/breadcrumbs-example/dotnet.mdx similarity index 100% rename from src/includes/breadcrumbs-example/dotnet.mdx rename to src/includes/breadcrumbs/breadcrumbs-example/dotnet.mdx diff --git a/src/includes/breadcrumbs-example/go.mdx b/src/includes/breadcrumbs/breadcrumbs-example/go.mdx similarity index 100% rename from src/includes/breadcrumbs-example/go.mdx rename to src/includes/breadcrumbs/breadcrumbs-example/go.mdx diff --git a/src/includes/breadcrumbs-example/java.mdx b/src/includes/breadcrumbs/breadcrumbs-example/java.mdx similarity index 100% rename from src/includes/breadcrumbs-example/java.mdx rename to src/includes/breadcrumbs/breadcrumbs-example/java.mdx diff --git a/src/includes/breadcrumbs-example/javascript.mdx b/src/includes/breadcrumbs/breadcrumbs-example/javascript.mdx similarity index 100% rename from src/includes/breadcrumbs-example/javascript.mdx rename to src/includes/breadcrumbs/breadcrumbs-example/javascript.mdx diff --git a/src/includes/breadcrumbs-example/native.mdx b/src/includes/breadcrumbs/breadcrumbs-example/native.mdx similarity index 100% rename from src/includes/breadcrumbs-example/native.mdx rename to src/includes/breadcrumbs/breadcrumbs-example/native.mdx diff --git a/src/includes/breadcrumbs-example/php.mdx b/src/includes/breadcrumbs/breadcrumbs-example/php.mdx similarity index 100% rename from src/includes/breadcrumbs-example/php.mdx rename to src/includes/breadcrumbs/breadcrumbs-example/php.mdx diff --git a/src/includes/breadcrumbs-example/python.mdx b/src/includes/breadcrumbs/breadcrumbs-example/python.mdx similarity index 100% rename from src/includes/breadcrumbs-example/python.mdx rename to src/includes/breadcrumbs/breadcrumbs-example/python.mdx diff --git a/src/includes/breadcrumbs-example/ruby.mdx b/src/includes/breadcrumbs/breadcrumbs-example/ruby.mdx similarity index 100% rename from src/includes/breadcrumbs-example/ruby.mdx rename to src/includes/breadcrumbs/breadcrumbs-example/ruby.mdx diff --git a/src/includes/breadcrumbs-example/rust.mdx b/src/includes/breadcrumbs/breadcrumbs-example/rust.mdx similarity index 100% rename from src/includes/breadcrumbs-example/rust.mdx rename to src/includes/breadcrumbs/breadcrumbs-example/rust.mdx diff --git a/src/includes/capture-error/flutter.mdx b/src/includes/capture-error/flutter.mdx new file mode 100644 index 0000000000000..6c26a9b2ce927 --- /dev/null +++ b/src/includes/capture-error/flutter.mdx @@ -0,0 +1,10 @@ + + +## Tips for Catching Errors + +- Use a `try/catch` block +- Use a `catchError` block for `Futures` +- The SDK already runs your init `callback` on an error handler, such as using `runZonedGuarded`, are captured automatically +- Flutter-specific errors, such as using `FlutterError.onError`, are captured automatically +- `Isolate` errors on the `current` Isolate which is the equivalent of a main/UI thread, such as using `Isolate.current.addErrorListener`, are captured automatically (only for non-Web Apps). +- For your own `Isolates`, add an `ErrorListener` and call `Sentry.captureException` diff --git a/src/includes/configuration/decluttering/android.mdx b/src/includes/configuration/decluttering/android.mdx index 2e118541f5266..80be08dbb0c9f 100644 --- a/src/includes/configuration/decluttering/android.mdx +++ b/src/includes/configuration/decluttering/android.mdx @@ -1,3 +1 @@ -### Decluttering Sentry - When used together with one of the logging framework integrations, the Android SDK captures all error logs as events. If you see a particular kind of error very often that has a `logger` tag, you can ignore that particular logger entirely. For more information see our Timber integration. diff --git a/src/includes/configuration/decluttering/java.mdx b/src/includes/configuration/decluttering/java.mdx index 2ddd4be51949e..c0a5c2859af15 100644 --- a/src/includes/configuration/decluttering/java.mdx +++ b/src/includes/configuration/decluttering/java.mdx @@ -1,3 +1 @@ -### Decluttering Sentry - When used together with one of the logging framework integrations, the Java SDK captures all error logs as events. If you see a particular kind of error very often that has a `logger` tag, you can ignore that particular logger entirely. For more information see our Logback or Log4j 2.x integration. diff --git a/src/includes/configuration/decluttering/javascript.mdx b/src/includes/configuration/decluttering/javascript.mdx index 2f33cfe58df67..b03ff1755e0f4 100644 --- a/src/includes/configuration/decluttering/javascript.mdx +++ b/src/includes/configuration/decluttering/javascript.mdx @@ -1,5 +1,3 @@ -### Decluttering Sentry - You can construct an allowed list of domains which might raise acceptable exceptions. For example, if your scripts are loaded from `cdn.example.com` and your site is `example.com`, you can set `allowUrls` to: ```javascript diff --git a/src/includes/configuration/decluttering/python.mdx b/src/includes/configuration/decluttering/python.mdx index fd7c8e1b2f633..f00718c4d65d4 100644 --- a/src/includes/configuration/decluttering/python.mdx +++ b/src/includes/configuration/decluttering/python.mdx @@ -1,3 +1 @@ -### Decluttering Sentry - By default the Python SDK captures all error logs as events. If you see a particular kind of error very often that has a `logger` tag, you can ignore that particular logger entirely. For more information see our logging integration. diff --git a/src/includes/getting-started-config/flutter.mdx b/src/includes/getting-started-config/flutter.mdx index eb0bea3fa4511..d7f4c450ff6f7 100644 --- a/src/includes/getting-started-config/flutter.mdx +++ b/src/includes/getting-started-config/flutter.mdx @@ -11,3 +11,5 @@ Future main() async { // or define SENTRY_DSN via Dart environment variable (--dart-define) } ``` + +You can configure the `SENTRY_DSN`, `SENTRY_RELEASE`, `SENTRY_DIST` and `SENTRY_ENVIRONMENT` via the Dart environment variables passing the `--dart-define` flag to the compiler as noted in the code sample. diff --git a/src/includes/getting-started-primer/flutter.mdx b/src/includes/getting-started-primer/flutter.mdx index 6f8bae740e9ea..798012d7ad377 100644 --- a/src/includes/getting-started-primer/flutter.mdx +++ b/src/includes/getting-started-primer/flutter.mdx @@ -1,7 +1,20 @@ -_Sentry's Flutter SDK enables capturing sessions for Release Health, offline caching as well as reporting messages and errors._ - -_Sentry's Flutter SDK depends on the [Dart SDK](/platforms/dart/) and includes support to native crashes through Sentry's native SDKs (Android and iOS), It'll capture errors in the native layer, including Java, Kotlin, C and C++ code for `Android` and ObjC, Swift and C for `iOS`._ +_Sentry's Flutter SDK enables automatic reporting of errors, messages, and exceptions. The SDK is available on GitHub [`sentry-dart`](https://github.com/getsentry/sentry-dart/)._ + +Features: + +- Automatic native crash error tracking (using both [Android](/platforms/android/) and [iOS](/platforms/apple/)), including + - Java, Kotlin, C, and C++ code for Android + - ObjC, Swift, and C for iOS +- Offline storage of events +- Events [enriched](/platforms/flutter/enriching-events/context/) with device data +- Breadcrumbs automatically captured: + - by the [Flutter SDK](/platforms/flutter/enriching-events/breadcrumbs/#automatic-breadcrumbs) + - via the Native SDKs [Automatic Breadcrumbs for Android](/platforms/android/enriching-events/breadcrumbs/#automatic-breadcrumbs) and [Automatic Breadcrumbs for iOS](/platforms/apple/usage/#sentryautobreadcrumbtrackingintegration) + - as well as `http` with the [Dart SDK](/platforms/dart/) +- [Release Health](/product/releases/health/) tracks crash free users and sessions +- Limited support for Flutter Web +- Under the hood the SDK relies on the [Dart SDK](/platforms/dart/); the minimum required version is `2.8.0` and Flutter SDK version is `1.17.0`. diff --git a/src/pages/index.tsx b/src/pages/index.tsx index bb70ba9bf2930..72493a7934403 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -32,6 +32,7 @@ const HIGHLIGHTED_PLATFORMS = [ "apple", "java.spring-boot", "ruby.rails", + "flutter", ]; const IndexPage = () => { diff --git a/src/platforms/common/configuration/filtering.mdx b/src/platforms/common/configuration/filtering.mdx index 897c712fb51a9..9d9121cc11bcc 100644 --- a/src/platforms/common/configuration/filtering.mdx +++ b/src/platforms/common/configuration/filtering.mdx @@ -86,11 +86,18 @@ In this example, the fingerprint is forced to a common value if an exception of : For breadcrumbs created from HTTP requests done via the legacy `XMLHttpRequest` API. This holds the original xhr object. + + + + +### Decluttering Sentry + - + + ## Using Sampling to Filter Transaction Events diff --git a/src/platforms/common/configuration/options.mdx b/src/platforms/common/configuration/options.mdx index 5e23352e8309f..f03832569e153 100644 --- a/src/platforms/common/configuration/options.mdx +++ b/src/platforms/common/configuration/options.mdx @@ -143,7 +143,7 @@ will be sent. This is a "contains" match to the entire file URL. As a result, if - + When set to `true`, the SDK will send session events to Sentry. This is supported in all browser SDKs, emitting one session per pageload and page navigation to Sentry. @@ -203,7 +203,7 @@ Sentry SDKs normalize any contextual data to a given depth. Any keys containing - + ## Integration Configuration @@ -236,13 +236,13 @@ The callback typically gets a second argument (called a "hint") which contains t - + ## Transport Options Transports are used to send events to Sentry. Transports can be customized to some degree to better support highly specific deployments. - + Switches out the transport used to send events. How this works depends on the SDK. It can, for instance, be used to capture events for unit-testing or to send it through some more complex setup that requires proxy authentication. @@ -284,16 +284,20 @@ Controls how many seconds to wait before shutting down. Sentry SDKs send events + + ## Tracing Options - + A number between 0 and 1, controlling the percentage chance a given transaction will be sent to Sentry. (0 represents 0% while 1 represents 100%.) Applies equally to all transactions created in the app. Either this or must be defined to enable tracing. - + A function responsible for determining the percentage chance a given transaction will be sent to Sentry. It will automatically be passed information about the transaction and the context in which it's being created, and must return a number between `0` (0% chance of being sent) and `1` (100% chance of being sent). Can also be used for filtering transactions, by returning 0 for those that are unwanted. Either this or must be defined to enable tracing. + + diff --git a/src/platforms/common/enriching-events/breadcrumbs.mdx b/src/platforms/common/enriching-events/breadcrumbs.mdx index 78449efe61db2..7caba33ea716c 100644 --- a/src/platforms/common/enriching-events/breadcrumbs.mdx +++ b/src/platforms/common/enriching-events/breadcrumbs.mdx @@ -24,7 +24,7 @@ Developers who want to modify the breadcrumbs interface can read about this in d You can manually add breadcrumbs whenever something interesting happens. For example, you might manually record a breadcrumb if the user authenticates or another state change happens. - + @@ -36,13 +36,13 @@ The available breadcrumb keys are `type`, `category`, `message`, `level`, `times ## Automatic Breadcrumbs -SDKs and their associated integrations will automatically record many types of breadcrumbs. For instance, the browser JavaScript SDK will automatically record all location changes. + ## Customize Breadcrumbs SDKs allow you to customize breadcrumbs through the `before_breadcrumb` hook. This hook is passed an already assembled breadcrumb and, in some SDKs, an optional hint. The function can modify the breadcrumb or decide to discard it entirely by returning `null`: - + For information about what can be done with the hint, see Filtering Events. diff --git a/src/platforms/common/enriching-events/scopes.mdx b/src/platforms/common/enriching-events/scopes.mdx index 723213ba62406..ca9d8f1cb8275 100644 --- a/src/platforms/common/enriching-events/scopes.mdx +++ b/src/platforms/common/enriching-events/scopes.mdx @@ -13,6 +13,7 @@ notSupported: - php - php.laravel - php.symfony + - flutter --- When an event is captured and sent to Sentry, SDKs will merge that event data with extra diff --git a/src/platforms/common/enriching-events/tags.mdx b/src/platforms/common/enriching-events/tags.mdx index 6bb8dcd870c33..2ca720d10c7b8 100644 --- a/src/platforms/common/enriching-events/tags.mdx +++ b/src/platforms/common/enriching-events/tags.mdx @@ -12,7 +12,7 @@ description: "Tags power UI features such as filters and tag-distribution maps. We’ll automatically index all tags for an event, as well as the frequency and the last time that Sentry has seen a tag. We also keep track of the number of distinct tags and can assist you in determining hotspots for various issues. - + Defining tags is easy, and will bind them to the [current scope](../scopes/) ensuring all future events within scope contain the same tags: diff --git a/src/platforms/flutter/index.mdx b/src/platforms/flutter/index.mdx deleted file mode 100644 index 2ff6baac038a4..0000000000000 --- a/src/platforms/flutter/index.mdx +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: Flutter ---- - - - -Get the SDK from [pub.dev](https://pub.dev/packages/sentry_flutter) by adding the following to your `pubspec.yaml`: - - - -Import `Sentry` and initialize it: - - - -Capture a test exception: - - - -### Source code - -The Sentry Dart/Flutter SDK can be found on GitHub [`sentry-dart`](https://github.com/getsentry/sentry-dart/). - - diff --git a/src/platforms/flutter/usage/advanced-usage.mdx b/src/platforms/flutter/usage/advanced-usage.mdx index 15b55463ccb1f..372854d45cf21 100644 --- a/src/platforms/flutter/usage/advanced-usage.mdx +++ b/src/platforms/flutter/usage/advanced-usage.mdx @@ -1,39 +1,16 @@ --- title: Advanced Usage sidebar_order: 2 +description: "Learn about advanced uses of the Flutter SDK, including uploading debug symbols, known limitations, and bundling." --- -## Requirements - -For the usage of the Flutter SDK, the minimal required Dart SDK version is `2.8.0` and Flutter SDK version is `1.17.0` - -## Automatic Breadcrumbs - -The Flutter SDK already captures breadcrumbs automatically via the Native SDKs. - -- [Automatic Breadcrumbs for Android](/platforms/android/enriching-events/breadcrumbs/#automatic-breadcrumbs) -- [Automatic Breadcrumbs for iOS](/platforms/apple/usage/#sentryautobreadcrumbtrackingintegration) - -If you wish to add additional Navigation breadcrumbs for Flutter Apps, Add the `SentryNavigatorObserver` to your `MaterialApp`, `WidgetsApp` or `CupertinoApp` - -```dart -import 'package:flutter/material.dart'; -import 'package:sentry_flutter/sentry_flutter.dart'; - -MaterialApp( - navigatorObservers: [ - SentryNavigatorObserver(), - ], - // other parameters -) -``` - -To track automatic Breadcrumbs for `HTTP` requests, Check out the [SentryHttpClient](/platforms/dart/usage/advanced-usage/#automatic-breadcrumbs) Wrapper for the [http](https://pub.dev/packages/http) library. ## Uploading Debug Symbols (Android and iOS) +Debug symbols provide information that Sentry displays on the Issue Details page to help you triage an issue. + - [iOS dSYM files](/platforms/apple/dsym/) -- [Android NDK](/product/cli/dif/#uploading-files), You've to do it manually, Do not use the `uploadNativeSymbols` flag from the [Sentry Gradle Plugin](/platforms/android/proguard/), it's not supported yet. +- [Android NDK](/product/cli/dif/#uploading-files) need to be done manually. Do not use the `uploadNativeSymbols` flag from the [Sentry Gradle Plugin](/platforms/android/proguard/) as it is not yet supported. - [Android Proguard/R8 mapping file](/platforms/android/proguard/) - [Source maps for Flutter Web](/product/cli/releases/#managing-release-artifacts) @@ -42,35 +19,13 @@ To track automatic Breadcrumbs for `HTTP` requests, Check out the [SentryHttpCli - Flutter `split-debug-info` and `obfuscate` flags aren't yet supported on iOS; they are supported only on Android. If this feature is enabled, Dart stack traces are not human readable, this is a tooling limitation, See: [43612](https://github.com/dart-lang/sdk/issues/43612) and [43274](https://github.com/dart-lang/sdk/issues/43274). - If you enable the `split-debug-info` feature, you must upload the Debug Symbols manually. - Also, Issue's titles might be obfuscated as we rely on the `runtimeType`, but they may not be human-readable, See: [Obfuscate Caveat](https://flutter.dev/docs/deployment/obfuscate#caveat) -- Layout related errors are only caught by [FlutterError.onError](https://api.flutter.dev/flutter/foundation/FlutterError/onError.html) in debug mode. In release mode, they are removed by the Flutter framework. See [Flutter build modes](https://flutter.dev/docs/testing/build-modes). - -## Tips for Catching Errors - -- Use a `try/catch` block -- Use a `catchError` block for `Futures` -- The SDK already runs your init `callback` on an error handler, e.g. using `runZonedGuarded`, are captured automatically -- Flutter-specific errors, e.g. using `FlutterError.onError`, are captured automatically -- `Isolate` errors on the `current` Isolate which is the equivalent of a main/UI thread, e.g. using `Isolate.current.addErrorListener`, are captured automatically (Only for non-Web Apps). -- For your own `Isolates`, add an `ErrorListener` and call `Sentry.captureException` - -## Caveat - -Always prefer the `SentryFlutter.init(...)` instead of `Sentry.init(...)` as it adds the Flutter integrations on top of the Dart SDK. - -## Advanced Usage (Android and iOS) - -- [iOS Advanced Usage](/platforms/apple/usage/) -- [Android Advanced Usage](/platforms/android/usage/advanced-usage/) - -## Dart environment variables - -- You can configure the `SENTRY_DSN`, `SENTRY_RELEASE`, `SENTRY_DIST` and `SENTRY_ENVIRONMENT` via the Dart environment variables passing the `--dart-define` flag to the compiler. +- Layout related errors are only caught by [FlutterError.onError](https://api.flutter.dev/flutter/foundation/FlutterError/onError.html) in debug mode. In release mode, they are removed by the Flutter framework. See [Flutter build modes](https://flutter.dev/docs/testing/build-modes). -## Building specific ABI on Android +## Building Specific ABI on Android The Sentry Flutter SDK includes the Sentry Android SDK, which bundles multiple native libraries for multiple ABIs. Building a Flutter app for a specific ABI using the `--target-platform` argument, for example an ARM 32bit apk, looks like this, which should also include the `--split-per-abi` flag: -```sh +```bash flutter build apk --target-platform=android-arm --split-per-abi ``` diff --git a/src/wizard/flutter/index.md b/src/wizard/flutter/index.md index bf5ce46402d04..87ebefe7e6678 100644 --- a/src/wizard/flutter/index.md +++ b/src/wizard/flutter/index.md @@ -5,7 +5,7 @@ support_level: production type: framework --- -Get the SDK from [pub.dev](https://pub.dev/packages/sentry_flutter) by adding the following to your `pubspec.yaml`: +Sentry captures data by using an SDK within your application’s runtime. Add the following to your `pubspec.yaml`: ```yml {filename:pubspec.yaml} dependencies: @@ -25,10 +25,12 @@ Future main() async { }, appRunner: () => runApp(MyApp()), ); -} + + // or define SENTRY_DSN via Dart environment variable (--dart-define) +} ``` -Capture a test exception: +Then create an intentional error, so you can test that everything is working: ```dart import 'package:sentry/sentry.dart'; @@ -42,3 +44,7 @@ try { ); } ``` + +If you're new to Sentry, use the email alert to access your account and complete a product tour. + +If you're an existing user and have disabled alerts, you won't receive this email.