Posted by Alice Yuan, Developer Relations Engineer at Google, Arti Arutiunov, Product Supervisor at Datadog and Nikita Ogorodnikov, Employees Software program Engineer at Datadog
Efficiency regressions are notoriously onerous to breed, making regressions a large bottleneck for cell builders. Though indicators like ANR charges point out what points happen in manufacturing, pinpointing the precise line of code that resulted within the efficiency problem has traditionally necessitated exhaustive handbook copy or speculative trial-and-error experimentation.
Datadog collaborated with Google to mitigate this frustration by integrating the ProfilingManager API (out there on Android 15+ units) into its Actual Consumer Monitoring (RUM) and Steady Profiling platforms. This integration transforms the debugging workflow, permitting builders to maneuver past surface-level signs to having the ability to detect the why behind a efficiency bottleneck.
By leveraging this system-level API, Datadog now processes tens of millions of manufacturing profiles weekly throughout the globe in line with Datadog inside knowledge of June 2026. It gives engineering groups with a brand new stage of visibility into real-world efficiency, all whereas sustaining a low runtime overhead for production-scale efficiency monitoring.
The affect of ProfilingManager
ProfilingManager is a system service launched in Android 15 that allows apps to programmatically accumulate efficiency knowledge reminiscent of name stack samples, area traces and reminiscence heap dumps immediately from manufacturing environments. This functionality shifts the engineering paradigm from reactive handbook copy to proactive area evaluation.
For instance, a Google communications app used area traces to research why its chilly begin occasions had been slower on newer, extra highly effective {hardware}. By diving into the field-collected traces and evaluating traces throughout completely different system varieties, the engineer found a hidden scheduling problem: a background text-to-speech service was unnecessarily being prewarmed throughout app startup. The traces revealed that this background course of was monopolizing the system’s highest-performing large CPU core, forcing the app’s most important thread to sleep whereas the prewarm occurred.
Fixing the Android code-level visibility problem
Previous to the implementation of ProfilingManager, Datadog’s Actual Consumer Monitoring (RUM) targeted on high-level utility well being and session-level telemetry to evaluate the person journey. Engineering groups might monitor Android efficiency indicators like time to preliminary show, ANR charges, CPU load, and frozen frames. These insights prolonged to granular interactions, reminiscent of community latency, contact occasions, and most important thread hangs. Nevertheless, whereas this knowledge successfully highlighted which efficiency bottlenecks had been surfacing within the area, it supplied no clear path to figuring out the foundation trigger of those failures.
To deal with this, Datadog wanted a profiling engine able to capturing Android traces immediately from units in manufacturing with minimal efficiency affect. After evaluating different approaches, reminiscent of writing their very own hint processor utilizing Android Debug APIs, the group chosen ProfilingManager as a result of it’s the most performant resolution of the profiling choices they evaluated and offloads the sampling choices overhead to the OS.
ProfilingManager helps a variety of assortment strategies, together with CPU traces, name stack sampling, reminiscence evaluation by Java heap dumps and native heap profiles. It permits builders to profile manufacturing builds, add hint recordsdata to exterior storage, and evaluation them within the Perfetto hint analyzer UI. As a SaaS supplier, Datadog uploads, visualizes, and analyzes these profiles collected through its SDK, offering a unified view of utility well being.
By centralizing high-fidelity telemetry inside a unified observability API, ProfilingManager empowers Datadog and its shoppers to proactively monitor, examine, and remediate advanced Android efficiency regressions by key technical benefits:
- Granular session diagnostics: ProfilingManager enhances debuggability by delivering direct OS-level hint knowledge, overcoming the visibility and alignment challenges typical of customized logging with system companies. To dive deeper, builders can obtain these traces from Datadog to research additional in visualization instruments just like the Perfetto UI.
- Automated telemetry triggers: By leveraging native system occasions to provoke hint recordings at key optimization factors, Datadog reduces the necessity to construct customized assortment logic. Whereas the preliminary rollout focuses on the APP_FULLY_DRAWN sign, there are already plans to increase this observability to embrace ANR, OOM, and COLD_START triggers.
- Proactive hint snapshots: By interfacing immediately with the system-level Perfetto service (traced), ProfilingManager makes use of a proactive background recording mannequin designed to seize unpredictable points. This ensures that builders obtain a exact visualization of the occasions main as much as a efficiency anomaly, providing a stage of perception that exceeds what is feasible by handbook instrumentation.
- Bottleneck detection at scale: Datadog is ready to synthesize telemetry from throughout Datadog’s international buyer base to uncover regressions that solely emerge beneath distinctive {hardware} configurations and variable community environments.
- System-enforced useful resource stability: The API leverages sampling hint assortment to make sure efficiency and person expertise impacts stay unnoticeable.
- On-device knowledge controls: ProfilingManager filters out irrelevant info from different processes on-device earlier than the profile is delivered to the app. This minimizes file sizes and ensures that solely knowledge related to the app’s processes is supplied.
Processing tens of millions of weekly profiles to optimize real-world apps
An instance of Datadog’s time to preliminary show measurement with
stack sampling powered by ProfilingManager
Integrating a system-level profiling API into a world monitoring SDK required fixing infrastructure challenges. As a result of ProfilingManager generates extremely detailed efficiency traces, the Datadog engineering group needed to construct a pipeline able to parsing and analyzing these profiles on the server aspect at scale. Past profile assortment, Datadog additionally emphasizes the significance of balancing sampling frequency with gathering sufficient knowledge to generate significant insights about your utility. Datadog depends on ProfilingManager’s built-in fee limiting as a crucial stability safeguard, stopping extreme telemetry requests from overburdening person units.
The group has been profiling Datadog’s personal native Android utility and a variety of early adopters’ functions for months, gathering tens of millions of profiles to make sure a quick, error-free launch expertise and to refine their performance-detection algorithms. At the moment, the manufacturing integration seamlessly scales throughout a wide range of Android units.
Conclusion
By integrating Android’s ProfilingManager API, Datadog efficiently closed the visibility hole between backend methods and cell shopper functions for his or her prospects. By processing tens of millions of profiles weekly with negligible system overhead, Datadog equips Android builders with the code-level insights essential to diagnose advanced efficiency bugs immediately, serving to builders construct smoother functions and enhance their app’s efficiency indicators within the Play Retailer. To undertake the ProfilingManager API immediately into your efficiency observability framework, take a look at our documentation.
Sooner or later, Datadog goals to make Android profiling knowledge a first-class enter for coding brokers to autonomously resolve efficiency bottlenecks, closing the suggestions loop between detection and remediation. Datadog is working towards making Android profiling broadly accessible to builders.
To get began utilizing the Datadog actual person monitoring characteristic powered by ProfilingManager, go to Datadog Cell Actual Consumer Monitoring.


