Skip to content

Conversation

@arti-arutiunov
Copy link
Contributor

@arti-arutiunov arti-arutiunov commented Jan 23, 2026

What does this PR do? What is the motivation?

Added 2 new pages about Android and iOS application profiling under the "Profiling" section of "Correlate RUM with Other Telemetry".

New pages introduced are:

Additionally, browser profiling has moved one layer down in the documentation:

Merge instructions

Merge readiness:

  • Ready for merge

For Datadog employees:

Your branch name MUST follow the <name>/<description> convention and include the forward slash (/). Without this format, your pull request will not pass CI, the GitLab pipeline will not run, and you won't get a branch preview. Getting a branch preview makes it easier for us to check any issues with your PR, such as broken links.

If your branch doesn't follow this format, rename it or create a new branch and PR.

[6/5/2025] Merge queue has been disabled on the documentation repo. If you have write access to the repo, the PR has been reviewed by a Documentation team member, and all of the required checks have passed, you can use the Squash and Merge button to merge the PR. If you don't have write access, or you need help, reach out in the #documentation channel in Slack.

Additional notes

@arti-arutiunov arti-arutiunov requested review from a team as code owners January 23, 2026 04:47
@github-actions github-actions bot added Architecture Everything related to the Doc backend Images Images are added/removed with this PR labels Jan 23, 2026
.setApplicationLaunchSampleRate() // default is 15%
.build.()

Profiling.enable(profilingConfig)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Profiling.enable(profilingConfig)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM) {
Profiling.enable(profilingConfig)
}

2. Initialize the RUM SDK and configure the `profilingMaximumRate`, which sets the maximum percentage of sessions that are profiled.

<div class="alert alert-danger">
If no value is specified, the default <code>profilingMaximumRate</code> is 15 percent.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If no value is specified, the default <code>profilingMaximumRate</code> is 15 percent.
If no value is specified, the default <code>applicationLaunchSampleRate</code> is 15 percent.

@cswatt cswatt added the editorial review Waiting on a more in-depth review label Jan 23, 2026
@cswatt
Copy link
Contributor

cswatt commented Jan 23, 2026

Created DOCS-13195 to track docs team review

Copy link
Contributor

@rtrieu rtrieu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for this great PR! left a lot of feedback around:

  • relative URLs
  • consistent tense
  • header styling
  • conciseness in some places
  • additional context in other places

let me know if you have any questions about my feedback. happy to chat!

)

// Enable Profiling feature
Profiling.enable(with: .init()) // default is 5%
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Profiling.enable(with: .init()) // default is 5%
Profiling.enable(with: .init()) // default is 15%

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iOS has a different sample rate of 5%

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would simplify or go with the example in the google docs

Suggested change
Profiling.enable(with: .init()) // default is 5%
Profiling.enable() // default is 5%

or

Suggested change
Profiling.enable(with: .init()) // default is 5%
Profiling.enable(with: .init(applicationLaunchSampleRate: 5)) // custom sample rate (overrides the default 5%)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah apologies, thought this was a typo because i saw 15 in another place


{{< img src="real_user_monitoring/ios/ios-profiling-session.png" alt="iOS profiling data in a view event to initial display vital event." style="width:90%;" >}}

Use the flame graph, thread timeline, and call graph visualizations to analyze the profiling data for the time to initial display. You can also download the profiling data for external analysis.
Copy link
Contributor

@rtrieu rtrieu Jan 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Use the flame graph, thread timeline, and call graph visualizations to analyze the profiling data for the time to initial display. You can also download the profiling data for external analysis.
Use the flame graph to identify which functions consume the most Wall time during launch, the thread timeline to see parallel execution patterns, and the call graph to trace function dependencies. You can also download the profiling data for external analysis or deeper investigation.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rtrieu iOS Profiling measures Wall time instead of CPU time

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@simaoseica-dd thanks, updated suggestion

Copy link
Contributor

@rtrieu rtrieu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for this great PR! left a lot of feedback around:

  • relative URLs
  • consistent tense
  • header styling
  • conciseness in some places
  • additional context in other places

let me know if you have any questions about my feedback. happy to chat!

arti-arutiunov and others added 3 commits January 24, 2026 22:00
Co-authored-by: Rosa Trieu <107086888+rtrieu@users.noreply.github.com>
Co-authored-by: Rosa Trieu <107086888+rtrieu@users.noreply.github.com>
@arti-arutiunov arti-arutiunov requested a review from rtrieu January 25, 2026 03:18
Copy link
Member

@0xnm 0xnm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a few suggestions, lgtm.


<div class="alert alert-warning">The total volume of profiles may not match the percentage configured in <code>applicationLaunchSampleRate</code>. This variation results from <a href="https://developer.android.com/topic/performance/tracing/profiling-manager/will-my-profile-always-be-collected#how-rate-limiting-works">rate limitations</a> within the data collector, including profiling support on older devices and the maximum profiling frequency per device.</div>

The [ProfilingManager API][4] also supports disablng rate limiting during debug builds.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The [ProfilingManager API][4] also supports disablng rate limiting during debug builds.
The [ProfilingManager API][4] also supports disabling rate limiting during debug builds.

Comment on lines +83 to +87
[4]: /real_user_monitoring/application_monitoring/ios/application_launch_monitoring?tab=swift




Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[4]: /real_user_monitoring/application_monitoring/ios/application_launch_monitoring?tab=swift
[4]: /real_user_monitoring/application_monitoring/ios/application_launch_monitoring?tab=swift

Comment on lines 43 to 66
class SampleApplication : Application() {
override fun onCreate() {
super.onCreate()
val configuration = Configuration.Builder(
clientToken = "<CLIENT_TOKEN>",
env = "<ENV_NAME>",
variant = "<APP_VARIANT_NAME>"
).build()

Datadog.initialize(this, configuration, trackingConsent)

// Enable RUM (required for Profiling)
val rumConfig = RumConfiguration.Builder(applicationId)
.build()
Rum.enable(rumConfig)

// Enable Profiling
val profilingConfig = ProfilingConfiguration.Builder()
.setApplicationLaunchSampleRate(15) // default is 15%
.build()

Profiling.enable(profilingConfig)
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
class SampleApplication : Application() {
override fun onCreate() {
super.onCreate()
val configuration = Configuration.Builder(
clientToken = "<CLIENT_TOKEN>",
env = "<ENV_NAME>",
variant = "<APP_VARIANT_NAME>"
).build()
Datadog.initialize(this, configuration, trackingConsent)
// Enable RUM (required for Profiling)
val rumConfig = RumConfiguration.Builder(applicationId)
.build()
Rum.enable(rumConfig)
// Enable Profiling
val profilingConfig = ProfilingConfiguration.Builder()
.setApplicationLaunchSampleRate(15) // default is 15%
.build()
Profiling.enable(profilingConfig)
}
}
class SampleApplication : Application() {
override fun onCreate() {
super.onCreate()
val configuration = Configuration.Builder(
clientToken = "<CLIENT_TOKEN>",
env = "<ENV_NAME>",
variant = "<APP_VARIANT_NAME>"
).build()
Datadog.initialize(this, configuration, trackingConsent)
// Enable RUM (required for Profiling)
val rumConfig = RumConfiguration.Builder(applicationId)
.build()
Rum.enable(rumConfig)
// Enable Profiling
val profilingConfig = ProfilingConfiguration.Builder()
.setApplicationLaunchSampleRate(15) // default is 15%
.build()
Profiling.enable(profilingConfig)
}
}

we can reduce indent

Profiling.enable(profilingConfig)
}
}
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two spaces before can be removed


// Enable Profiling feature
Profiling.enable(with: .init()) // default is 5%
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two spaces before can be removed

Comment on lines 41 to 63
import DatadogCore
import DatadogRUM
import DatadogProfiling

// Initialize Datadog SDK with your configuration
Datadog.initialize(
with: Datadog.Configuration(
clientToken: "<client token>", // From Datadog UI
env: "<environment>", // for example, "production", "staging"
service: "<service name>" // Your app's service name
),
trackingConsent: trackingConsent // GDPR compliance setting
)

// Enable RUM feature
RUM.enable(
with: RUM.Configuration(
applicationID: "<rum application id>"
)
)

// Enable Profiling feature
Profiling.enable(with: .init()) // default is 5%
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import DatadogCore
import DatadogRUM
import DatadogProfiling
// Initialize Datadog SDK with your configuration
Datadog.initialize(
with: Datadog.Configuration(
clientToken: "<client token>", // From Datadog UI
env: "<environment>", // for example, "production", "staging"
service: "<service name>" // Your app's service name
),
trackingConsent: trackingConsent // GDPR compliance setting
)
// Enable RUM feature
RUM.enable(
with: RUM.Configuration(
applicationID: "<rum application id>"
)
)
// Enable Profiling feature
Profiling.enable(with: .init()) // default is 5%
import DatadogCore
import DatadogRUM
import DatadogProfiling
// Initialize Datadog SDK with your configuration
Datadog.initialize(
with: Datadog.Configuration(
clientToken: "<client token>", // From Datadog UI
env: "<environment>", // for example, "production", "staging"
service: "<service name>" // Your app's service name
),
trackingConsent: trackingConsent // GDPR compliance setting
)
// Enable RUM feature
RUM.enable(
with: RUM.Configuration(
applicationID: "<rum application id>"
)
)
// Enable Profiling feature
Profiling.enable(with: .init()) // default is 5%

)

// Enable Profiling feature
Profiling.enable(with: .init()) // default is 5%
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iOS has a different sample rate of 5%

)

// Enable Profiling feature
Profiling.enable(with: .init()) // default is 5%
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would simplify or go with the example in the google docs

Suggested change
Profiling.enable(with: .init()) // default is 5%
Profiling.enable() // default is 5%

or

Suggested change
Profiling.enable(with: .init()) // default is 5%
Profiling.enable(with: .init(applicationLaunchSampleRate: 5)) // custom sample rate (overrides the default 5%)


## Overview

iOS profiling captures detailed data about your application's performance during launch, helping you identify slow functions and optimize startup time. iOS profiling is built on top of the [mach Kernel API][1] and samples all application threads to collect call stacks for all application processes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "...for all application processes" is confusing

Suggested change
iOS profiling captures detailed data about your application's performance during launch, helping you identify slow functions and optimize startup time. iOS profiling is built on top of the [mach Kernel API][1] and samples all application threads to collect call stacks for all application processes.
iOS profiling captures detailed data about your application's performance during launch, helping you identify slow functions and optimize startup time. iOS profiling is built on top of the [mach Kernel API][1] and periodically samples all application threads to collect call stacks.


{{< img src="real_user_monitoring/ios/ios-profiling-session.png" alt="iOS profiling data in a view event to initial display vital event." style="width:90%;" >}}

Use the flame graph, thread timeline, and call graph visualizations to analyze the profiling data for the time to initial display. You can also download the profiling data for external analysis.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rtrieu iOS Profiling measures Wall time instead of CPU time

Copy link
Contributor

@rtrieu rtrieu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a few more tiny suggestions!

@arti-arutiunov arti-arutiunov merged commit 8572f08 into master Jan 28, 2026
20 checks passed
@arti-arutiunov arti-arutiunov deleted the Arti-Arutiunov/ios-android-profiling branch January 28, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Architecture Everything related to the Doc backend editorial review Waiting on a more in-depth review Images Images are added/removed with this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants