Skip to content

Commit 35cd631

Browse files
authored
[RUM-8832] Clarify SDK and RUM initialization timing requirements in setup.md (#30551)
1 parent f561056 commit 35cd631

File tree

1 file changed

+7
-3
lines changed
  • content/en/real_user_monitoring/mobile_and_tv_monitoring/ios

1 file changed

+7
-3
lines changed

content/en/real_user_monitoring/mobile_and_tv_monitoring/ios/setup.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,11 @@ For more information about setting up a client token, see the [Client token docu
131131

132132
### Step 3 - Initialize the library
133133

134-
In the initialization snippet, set an environment name, service name, and version number. In the examples below, `app-name` specifies the variant of the application that generates data.
134+
In the initialization snippet, set an environment name, service name, and client token.
135+
136+
The SDK should be initialized as early as possible in the app lifecycle, specifically in the `AppDelegate`'s `application(_:didFinishLaunchingWithOptions:)` callback. This ensures all measurements, including application startup duration, are captured correctly. For apps built with SwiftUI, you can use `@UIApplicationDelegateAdaptor` to hook into the `AppDelegate`.
137+
138+
<div class="alert alert-warning">Initializing the SDK elsewhere (for example later during view loading) may result in inaccurate or missing telemetry, especially around app startup performance.</div>
135139

136140
For more information, see [Using Tags][5].
137141

@@ -402,8 +406,8 @@ For example, if the current tracking consent is `.pending`:
402406
403407
### Step 4 - Start sending data
404408
405-
#### Initialize the Datadog Monitor
406-
Configure and register the Datadog Monitor. You only need to do it once, usually in your `AppDelegate` code:
409+
#### Enable RUM
410+
Configure and start RUM. This should be done once and as early as possible, specifically in your `AppDelegate`:
407411
408412
{{< tabs >}}
409413
{{% tab "Swift" %}}

0 commit comments

Comments
 (0)