-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Flutter docs improvements #3187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
f463c04
823a791
14b3872
e36a3cd
315548f
7577c93
fbf1e0e
88291b9
590856f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,4 +9,4 @@ SentryXamarin.Init(options => | |
| ? null | ||
| : breadcrumb; | ||
| }); | ||
| ``` | ||
| ``` | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| You can capture any exception object that you caught: | ||
|
|
||
| ```dart | ||
| import 'package:sentry/sentry.dart'; | ||
| try { | ||
| aMethodThatMightFail(); | ||
| } catch (exception, stackTrace) { | ||
| await Sentry.captureException( | ||
| exception, | ||
| stackTrace: stackTrace, | ||
| ); | ||
| } | ||
| ``` | ||
|
|
||
| ## 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` | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,18 @@ | ||
| <Note> | ||
|
|
||
| _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/)._ | ||
|
|
||
| </Note> | ||
|
|
||
| Features: | ||
|
|
||
| - Automatic native crash error tracking (using both [Android](/platforms/android/) and [iOS](/platforms/apple/)), including | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we also Support Flutter Web, it's a bit limited compared to Android and iOS, of course.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've added "Limited Support for Flutter Web" - LMK if there's a link to add or if that wording is quite what we want here @bruno-garcia
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sounds good to me, so we don't create much expectations from Web devs as we didn't spend time on it |
||
| - 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 via the Native SDKs. | ||
PeloWriter marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| - [Automatic Breadcrumbs for Android](/platforms/android/enriching-events/breadcrumbs/#automatic-breadcrumbs) | ||
| - [Automatic Breadcrumbs for iOS](/platforms/apple/usage/#sentryautobreadcrumbtrackingintegration) | ||
| - [Release Health](/product/releases/health/) tracks crash free users and sessions | ||
| - 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`. | ||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.