Skip to content

Commit 2b04df7

Browse files
add ignoreRoutes for SentryNavigatorObserver in sentry-dart (#11018)
* 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]>
1 parent 1eb8ac3 commit 2b04df7

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

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

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,6 @@ There are two ways to set up TTID:
109109

110110
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:
111111

112-
113-
114112
```dart
115113
import 'package:sentry_flutter/sentry_flutter.dart';
116114
@@ -261,6 +259,20 @@ SentryNavigatorObserver(
261259
)
262260
```
263261

262+
### Ignore Routes
263+
264+
Set `ignoreRoutes` if you want routes to be ignored and not processed by the navigation observer.
265+
Empty by default.
266+
267+
```dart
268+
import 'package:sentry_flutter/sentry_flutter.dart';
269+
270+
/// Ignore matching routes
271+
SentryNavigatorObserver(
272+
ignoreRoutes: ["/ignoreThisRoute", "/my/ignored/route"],
273+
)
274+
```
275+
264276
### Override Transaction Name
265277

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

0 commit comments

Comments
 (0)