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
{{ message }}
Repository navigation
Commit 6af2016
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: en/rum/quickstart/app-management.mdx
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,7 @@ The console provides detailed integration guides for each platform:
74
74
75
75
-**JavaScript (Web)**: After configuring parameters like service name, preview the `flashcatRum.init()` initialization code in real-time
76
76
-**Android**: Shows complete integration steps including adding Gradle dependencies (`cloud.flashcat:dd-sdk-android-core` and `cloud.flashcat:dd-sdk-android-rum`), initializing the SDK in `Application.onCreate()` with RUM enabled, and optional WebView tracking integration
77
-
-**iOS**: Shows complete integration steps including adding Swift Package Manager dependency (`fc-sdk-ios`, from version 0.3.0), initializing the SDK in `AppDelegate.didFinishLaunchingWithOptions` with RUM enabled, and optional WebView tracking integration
77
+
-**iOS**: Shows complete integration steps including adding Swift Package Manager dependency (`fc-sdk-ios`, from version 0.6.0), initializing the SDK in `AppDelegate.didFinishLaunchingWithOptions` with RUM enabled, and optional WebView tracking integration
78
78
-**Flutter**: The Flutter SDK wraps the Android/iOS native SDKs, so one integration monitors both platforms. See [Flutter SDK Integration](/en/rum/sdk/flutter/sdk-integration)
79
79
-**WeChat Mini Program**: Fill in `env`, `service`, `version`, and `sessionSampleRate` in the form, and the `flashcatRum.init()` snippet built on `@flashcatcloud/miniprogram-rum` is generated and previewed in real time (see "WeChat Mini Program SDK Configuration Assistant" below)
80
80
-**Electron**: Provides a step-by-step integration guide — install `@flashcatcloud/electron-sdk` in the main process and complete initialization inside `app.whenReady()` (this must finish before any window is created; with the wrong ordering the SDK reports no error but collects no data). To capture page views, user actions, network requests, and JS errors inside your windows, optionally integrate `@flashcatcloud/browser-rum` in the renderer process, whose data is handed to the main process over an IPC bridge for unified reporting. When bundling the main process with Vite / webpack / esbuild, you can also add the corresponding plugin to keep the SDK's runtime dependencies. See [Electron SDK Integration](/en/rum/sdk/electron/sdk-integration)
@@ -297,7 +297,7 @@ After disabling geo-location or IP address collection, the related filter and an
297
297
The **Remote Configuration** tab lets you adjust collection and privacy parameters online, without code changes or a new release. When enabled, the configuration on this page overrides SDK initialization settings. When disabled, clients fall back to their SDK initialization settings and data collection continues uninterrupted.
298
298
299
299
<Note>
300
-
- Remote Configuration is currently available for **Browser** and **WeChat Mini Program** applications. Other platform types will be enabled as their SDKs ship support.
300
+
- Remote Configuration is currently available for **Browser**, **iOS** and **WeChat Mini Program** applications. Other platform types will be enabled as their SDKs ship support.
301
301
- On SaaS the feature is rolled out account by account. If the **Remote Configuration** tab is not visible on the application detail page, contact support to enable it. On private deployments it is available by default.
302
302
</Note>
303
303
@@ -311,7 +311,7 @@ The **Remote Configuration** tab lets you adjust collection and privacy paramete
311
311
|**Replay privacy level**|`mask` / `mask-user-input` / `allow`| Default masking of page content in Session Replay: `mask` obscures text and hides input values; `mask-user-input` keeps page text and hides only what users typed; `allow` records the page as it is. Loosening the level starts collecting content that was not collected before, and replays already uploaded cannot be retroactively masked. The console asks you to confirm again before publishing |
312
312
|**Custom configuration keys**| Key–value pairs typed as string / number / boolean / JSON | Delivered to clients together with the remote configuration and read by your application code; the platform does not interpret them. Up to 5 keys; each key name is at most 64 bytes (counted in UTF-8, not characters), each value at most 4 KB and nesting at most 3 levels (objects and arrays each count one level), and all custom entries together at most 16 KB |
313
313
314
-
WeChat Mini Program applications also show the **Remote Configuration** tab, but the mini program SDK reads only the **session sample rate** and **custom configuration keys** (mini programs have no Session Replay; the other values are neither delivered nor effective).
314
+
iOS and WeChat Mini Program applications also show the **Remote Configuration** tab, but their SDKs read only the **session sample rate** and **custom configuration keys** (neither platform has Session Replay; the other values are neither delivered nor effective). Every SDK has to opt in with `remoteConfigurationEnabled: true` at initialization (off by default; an application that has not opted in never requests the configuration). On iOS this requires SDK 0.6.0 or later, see [iOS SDK Advanced Configuration](/en/rum/sdk/ios/advanced-config#remote-configuration).
315
315
316
316
<Warning>
317
317
Custom entries are delivered to clients and may be readable by end users. Never put secrets, access tokens, or personally sensitive information in them.
Copy file name to clipboardExpand all lines: en/rum/sdk/ios/advanced-config.mdx
+51Lines changed: 51 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -247,6 +247,57 @@ RUM.enable(
247
247
Sampled-out sessions will not collect any page views or related telemetry data.
248
248
</Warning>
249
249
250
+
## Remote Configuration
251
+
252
+
Starting with SDK 0.6.0, the session sample rate can be adjusted online from the console under **Application Management > Remote Configuration**, with no code change or new release. The feature is off by default and has to be enabled at initialization:
253
+
254
+
```swift
255
+
importDatadogRUM
256
+
257
+
RUM.enable(
258
+
with: RUM.Configuration(
259
+
applicationID: "<RUM_APPLICATION_ID>",
260
+
sessionSampleRate: 100, // used until the console publishes a rate
- The SDK requests the configuration from the RUM intake when `RUM.enable()` is called, and again each time a new session is created. A rate published in the console applies to the **next new session**; a session already under way is not affected.
278
+
- The delivered values are persisted locally, so the first session after a cold start is already drawn under the last delivered rate.
279
+
- A failed, timed-out or unreadable response leaves the values in force untouched; they are never cleared. When remote configuration is disabled in the console, the SDK falls back to the `sessionSampleRate` passed at initialization.
280
+
- The iOS SDK reads only the **session sample rate** and **custom configuration keys**; the other settings have no effect. Read the custom keys with `RUMMonitor.shared().getRemoteConfig()`, which returns `nil` when remote configuration is off or the console set none.
281
+
282
+
To decide sampling by your own business rules, use the `beforeSampling` callback. Each time a new session is about to be drawn it receives the rate that would apply (`sessionSampleRate`) and the console's custom keys (`custom`); return a rate to override it, or `nil` to leave it alone. It runs synchronously inside session creation, so keep it fast and non-blocking; a value outside 0–100 is ignored.
283
+
284
+
```swift
285
+
RUM.enable(
286
+
with: RUM.Configuration(
287
+
applicationID: "<RUM_APPLICATION_ID>",
288
+
remoteConfigurationEnabled: true,
289
+
beforeSampling: { context in
290
+
// e.g. collect every session of internal accounts, keep the console's rate for the rest
291
+
isInternalUser ? 100 : nil
292
+
}
293
+
)
294
+
)
295
+
```
296
+
297
+
To collect the current user regardless of the sample rate (for example while investigating one user's issue), call `RUMMonitor.shared().setForcedSession()`: every session drawn afterwards is collected for the lifetime of the process, while a session already under way is not re-decided.
298
+
299
+
For the console side (settings, publishing and when a version takes effect), see [Application Management · Remote Configuration](/en/rum/quickstart/app-management#remote-configuration).
300
+
250
301
## App Hang Detection
251
302
252
303
An App Hang is a period during which the main thread is blocked and the UI cannot respond to user input. On iOS it is the only data source behind the **Unresponsive Time Rate** metric in the analytics dashboard.
0 commit comments