You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: en/rum/sdk/flutter/advanced-config.mdx
+39-1Lines changed: 39 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,6 +59,9 @@ DatadogRumConfiguration(
59
59
For hosts that match `firstPartyHosts`, the SDK injects the W3C `traceparent` to correlate frontend RUM with backend APM. Tracing requires network collection (`enableHttpTracking()`).
`customEndpoint` is the final RUM intake URL, not a base origin. It must include `/api/v2/rum`. If the deployment uses a path prefix, preserve it as well, for example `https://example.com/flashduty/api/v2/rum`.
90
+
</Warning>
91
+
92
+
## WebView tracking
93
+
94
+
When a Flutter screen embeds a WebView, use `flashcat_webview_tracking` to correlate Browser RUM events from the WebView with the current native RUM session.
Pass the allowed hostnames to `trackDatadogEvents`. A hostname matches its subdomains, but wildcards are not supported. The page loaded in the WebView must already use the <ahref="/en/rum/sdk/web/sdk-integration">Flashduty Browser SDK</a>. On Android, you must also enable `JavaScriptMode.unrestricted`, or correlation will not work.
118
+
85
119
## Symbol file upload
86
120
87
121
To resolve crash and error stacks back to source locations, you need to upload symbol files. A Flutter application may contain both Dart and native frames:
@@ -119,4 +153,8 @@ What must match is the build ID: the `app.<platform>-<arch>.symbols` file produc
119
153
|`detectLongTasks`| true | Whether to collect long tasks |
120
154
|`longTaskThreshold`| 0.1s | Long task threshold |
121
155
|`trackBackgroundEvents`| false | Whether to collect events while the application is in the background |
156
+
|`vitalUpdateFrequency`|`VitalsFrequency.average`| Collection frequency for native mobile performance metrics; set to `null` to disable |
|`trackNonFatalAnrs`| Platform default | Whether to collect non-fatal ANRs; disabled by default on Android 30+ and enabled by default on Android 29 and earlier |
159
+
|`appHangThreshold`| null | iOS App Hang threshold in seconds; `null` disables collection |
122
160
|`batchSize` / `uploadFrequency`| — | Upload batch size and frequency, balancing real-time delivery against battery usage |
| RUM data source | Events always write `source: "flutter"`|
19
19
| Implementation | A Flutter plugin wrapping the native iOS / Android SDKs |
20
20
| Data upload |`POST /api/v2/rum`|
@@ -28,7 +28,7 @@ This page describes the Flutter SDK support scope and current limits so you can
28
28
| WebView tracking |`flashcat_webview_tracking`| Correlates RUM data inside WebViews |
29
29
30
30
<Note>
31
-
Dart class names begin with `Datadog*`, and the site enum is `FlashcatSite` (`.cn`default / `.staging`). The `DatadogSdk`, `DatadogConfiguration`, `DatadogRumConfiguration`, `DatadogNavigationObserver`, and other classes in the documentation examples are the actual exported class names.
31
+
Dart class names begin with `Datadog*`, and the site enum is `FlashcatSite`. Use the default `.cn`site for customer-facing production environments; configure the full `customEndpoint` for on-premises deployments. The `DatadogSdk`, `DatadogConfiguration`, `DatadogRumConfiguration`, `DatadogNavigationObserver`, and other classes in the documentation examples are the actual exported class names.
32
32
</Note>
33
33
34
34
## Supported automatic collection
@@ -41,6 +41,8 @@ Dart class names begin with `Datadog*`, and the site enum is `FlashcatSite` (`.c
41
41
| Unhandled exceptions | Supported | When using `DatadogSdk.runApp`, automatically takes over `FlutterError.onError` / `PlatformDispatcher.onError`|
| Distributed tracing | Supported | Injects W3C `traceparent` for hosts that match `firstPartyHosts`|
44
+
| Native mobile performance metrics | Supported | Collects app start (TTID), refresh rate, and memory by default |
45
+
| Hang detection | Supported | Android supports ANRs; iOS supports App Hangs after you set `appHangThreshold`|
44
46
45
47
## Current limits
46
48
@@ -50,7 +52,7 @@ Dart class names begin with `Datadog*`, and the site enum is `FlashcatSite` (`.c
50
52
| Logs | Log reporting is not supported (`DatadogLoggingConfiguration` is a no-op) |
51
53
| Session Replay | Not supported |
52
54
| dio / gql / grpc | The corresponding interceptor packages are not supported |
53
-
|Page performance metrics|`reportFlutterPerformance` is disabled by default |
55
+
|Flutter rendering timings|`reportFlutterPerformance` is disabled by default; it controls only Flutter build / raster timings and does not affect the native mobile performance metrics collected by default |
54
56
| Minimum version | Use `flashcat_flutter_plugin` 0.1.3 or later; on earlier versions `flutter build apk --release` fails in R8 |
| Memory | iOS / Android | Memory usage while the application is running |
38
+
| ANR | Android | Application Not Responding events; the Android version determines the default for non-fatal ANRs, which you can override with `trackNonFatalAnrs`|
39
+
| App Hang | iOS | Main-thread hang events; requires `appHangThreshold` and is disabled by default |
App start, refresh-rate, and memory vitals are controlled by `vitalUpdateFrequency`, which defaults to `VitalsFrequency.average`; set it to `null` to disable them. `reportFlutterPerformance` controls only Flutter frame build / raster timings and is disabled by default. It does not affect these native vitals.
43
+
29
44
## Manual instrumentation
30
45
31
46
In addition to automatic collection, you can manually record events and attributes.
|`trackNonFatalAnrs`| Platform default | Whether to collect non-fatal ANRs; disabled by default on Android 30+ and enabled by default on Android 29 and earlier |
78
+
|`appHangThreshold`| null | iOS App Hang threshold in seconds; `null` disables collection |
60
79
61
80
## Data masking
62
81
@@ -76,4 +95,4 @@ DatadogRumConfiguration(
76
95
77
96
- The SDK batches and caches at the native layer, uploading in batches by `batchSize` and `uploadFrequency`
78
97
- When the network is unavailable, events are persisted locally and retried after recovery
79
-
- The upload endpoint defaults to the site's endpoint (`FlashcatSite.cn` → `browser.flashcat.cloud`); on-premises deployments can override it through `customEndpoint`
98
+
- The upload endpoint defaults to `https://browser.flashcat.cloud/api/v2/rum`; on-premises deployments can set `customEndpoint` to the full RUM intake URL (it must include `/api/v2/rum` and preserve any deployment path prefix)
- Initialize the SDK early in application startup (in `main()`)
21
21
22
22
## Install the SDK
@@ -51,7 +51,7 @@ Future<void> main() async {
51
51
rumConfiguration: DatadogRumConfiguration(
52
52
applicationId: '<APPLICATION_ID>',
53
53
sessionSamplingRate: 100.0,
54
-
// customEndpoint: 'https://your-ingest.example.com', // Custom reporting endpoint for on-premises deployments
54
+
// customEndpoint: 'https://your-ingest.example.com/api/v2/rum', // On-premises RUM intake URL
55
55
),
56
56
);
57
57
@@ -68,14 +68,27 @@ Do not use server-side secrets in client code. `clientToken` is only for client-
68
68
If you need to control the startup flow yourself, outside of `runApp`, you can also initialize manually, but you must wire up error collection yourself:
0 commit comments