From 5ae62ebd6a5d42dd07b748064f3b6cc3189f2d51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Andra=C5=A1ec?= Date: Thu, 20 Jan 2022 14:21:54 +0100 Subject: [PATCH 1/3] Document idle time param and trimming --- .../instrumentation/automatic-instrumentation.mdx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/platforms/flutter/common/performance/instrumentation/automatic-instrumentation.mdx b/src/platforms/flutter/common/performance/instrumentation/automatic-instrumentation.mdx index 5d4229d6c192e..3a4a77c80cf96 100644 --- a/src/platforms/flutter/common/performance/instrumentation/automatic-instrumentation.mdx +++ b/src/platforms/flutter/common/performance/instrumentation/automatic-instrumentation.mdx @@ -28,7 +28,7 @@ For more information see our [SentryHttpClient integration](/platforms/dart/usag -Supported in Sentry's Dart SDK version `6.3.0-beta.1` and above. +Supported in Sentry's Dart SDK version `6.3.0-beta.3` and above. @@ -62,10 +62,19 @@ The SDK sets the span `operation` to `navigation` and the `name` to the one prov Transactions will be bound to the scope if no other transaction is currently bound to it. -The started transactions will idle for a fixed amount of time, for which the default is `three seconds`. +The started transactions will idle for a fixed amount of time, for which the default is `three seconds`. You can also change this by setting `autoFinishAfter` in the navigators constuctor. + +```dart +/// Change how long navigation transactions idle before beeing finished +SentryNavigatorObserver( + autoFinishAfter: Duration(seconds: 5) +) +``` Child spans started will be attached to the transaction. If they run longer than the idle time, the transaction will be extended and finished when all its children are complete. +If children are finished before the idle timeout, the transaction end will be trimmed, and its end time will be set to the last child end time. + You can also opt out of this behaviour by setting `enableAutoTransactions` to false in the `SentryNavigatorObserver` constructor. You might do this when you only want to use navigation breadcrumbs, which can be enabled by setting the constructor parameter `setRouteNameAsTransaction` to `true`. ```dart From 6a05ee8863382b52fc7af772d051bbf3d2028f2d Mon Sep 17 00:00:00 2001 From: Manoel Aranda Neto <5731772+marandaneto@users.noreply.github.com> Date: Thu, 20 Jan 2022 15:19:55 +0100 Subject: [PATCH 2/3] Update src/platforms/flutter/common/performance/instrumentation/automatic-instrumentation.mdx Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com> --- .../performance/instrumentation/automatic-instrumentation.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platforms/flutter/common/performance/instrumentation/automatic-instrumentation.mdx b/src/platforms/flutter/common/performance/instrumentation/automatic-instrumentation.mdx index 3a4a77c80cf96..8327fc15a1f5f 100644 --- a/src/platforms/flutter/common/performance/instrumentation/automatic-instrumentation.mdx +++ b/src/platforms/flutter/common/performance/instrumentation/automatic-instrumentation.mdx @@ -65,7 +65,7 @@ Transactions will be bound to the scope if no other transaction is currently bou The started transactions will idle for a fixed amount of time, for which the default is `three seconds`. You can also change this by setting `autoFinishAfter` in the navigators constuctor. ```dart -/// Change how long navigation transactions idle before beeing finished +/// Change how long navigation transactions idle before being finished SentryNavigatorObserver( autoFinishAfter: Duration(seconds: 5) ) From d43dfd9f294dbcc51110c9981084322fd093a57d Mon Sep 17 00:00:00 2001 From: Manoel Aranda Neto <5731772+marandaneto@users.noreply.github.com> Date: Thu, 20 Jan 2022 15:21:17 +0100 Subject: [PATCH 3/3] Update src/platforms/flutter/common/performance/instrumentation/automatic-instrumentation.mdx --- .../performance/instrumentation/automatic-instrumentation.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/platforms/flutter/common/performance/instrumentation/automatic-instrumentation.mdx b/src/platforms/flutter/common/performance/instrumentation/automatic-instrumentation.mdx index 8327fc15a1f5f..76591bd0a8345 100644 --- a/src/platforms/flutter/common/performance/instrumentation/automatic-instrumentation.mdx +++ b/src/platforms/flutter/common/performance/instrumentation/automatic-instrumentation.mdx @@ -65,6 +65,8 @@ Transactions will be bound to the scope if no other transaction is currently bou The started transactions will idle for a fixed amount of time, for which the default is `three seconds`. You can also change this by setting `autoFinishAfter` in the navigators constuctor. ```dart +import 'package:sentry_flutter/sentry_flutter.dart'; + /// Change how long navigation transactions idle before being finished SentryNavigatorObserver( autoFinishAfter: Duration(seconds: 5)