Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix automatic breadcrumbs and associated includes
  • Loading branch information
PeloWriter committed Mar 4, 2021
commit e36a3cd70782f52aa148780c99182a9c13c085a7
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.
20 changes: 20 additions & 0 deletions src/includes/breadcrumbs/automatic-breadcrumbs/flutter.mdx
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
Expand Up @@ -9,4 +9,4 @@ SentryXamarin.Init(options =>
? null
: breadcrumb;
});
```
```
7 changes: 5 additions & 2 deletions src/includes/getting-started-primer/flutter.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Note>

_Sentry's Flutter SDK enables automatic reporting of errors, messages, and exceptions. The Sentry Dart/Flutter SDK is available on GitHub [`sentry-dart`](https://github.com/getsentry/sentry-dart/)._
_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>

Expand All @@ -11,5 +11,8 @@ Features:
- 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.
- [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/)
- 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`.
6 changes: 3 additions & 3 deletions src/platforms/common/enriching-events/breadcrumbs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<PlatformContent includePath="breadcrumbs-example" />
<PlatformContent includePath="breadcrumbs/breadcrumbs-example" />

<PlatformSection supported={["javascript", "node", "python", "php", "ruby", "elixir", "perl", "native"]}>

Expand All @@ -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.
<PlatformContent includePath="breadcrumbs/automatic-breadcrumbs" />

## 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`:

<PlatformContent includePath="before-breadcrumb" />
<PlatformContent includePath="breadcrumbs/before-breadcrumb" />

For information about what can be done with the hint, see <PlatformLink to="/enriching-events/breadcrumbs/">Filtering Events</PlatformLink>.

Expand Down
25 changes: 2 additions & 23 deletions src/platforms/flutter/usage/advanced-usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,11 @@ title: Advanced Usage
sidebar_order: 2
---

## 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)

Expand All @@ -42,7 +21,7 @@ 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).
- 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

Expand Down