Skip to content

Commit

Permalink
add ignoreRoutes for SentryNavigatorObserver in sentry-dart (#11018)
Browse files Browse the repository at this point in the history
* add ignoreRoutes for SentryNavigatorObserver in sentry-dart

* Update docs/platforms/flutter/integrations/routing-instrumentation.mdx

Co-authored-by: Giancarlo Buenaflor <[email protected]>

---------

Co-authored-by: Giancarlo Buenaflor <[email protected]>
  • Loading branch information
martinhaintz and buenaflor authored Aug 14, 2024
1 parent 1eb8ac3 commit 2b04df7
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions docs/platforms/flutter/integrations/routing-instrumentation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@ There are two ways to set up TTID:

The default setup is enabled automatically, but only provides an approximation of TTID. To set a more accurate TTID, manually wrap the desired widget with `SentryDisplayWidget`, as shown below:



```dart
import 'package:sentry_flutter/sentry_flutter.dart';
Expand Down Expand Up @@ -261,6 +259,20 @@ SentryNavigatorObserver(
)
```

### Ignore Routes

Set `ignoreRoutes` if you want routes to be ignored and not processed by the navigation observer.
Empty by default.

```dart
import 'package:sentry_flutter/sentry_flutter.dart';
/// Ignore matching routes
SentryNavigatorObserver(
ignoreRoutes: ["/ignoreThisRoute", "/my/ignored/route"],
)
```

### Override Transaction Name

Set `setRouteNameAsTransaction` to `true` to override the transaction name with the route name.
Expand Down

0 comments on commit 2b04df7

Please sign in to comment.