.NET Continuous Profiler: Under the hood | Datadog
Jan 9, 2024Christophe Nasarre

Summary
This post details the technical architecture and implementation choices behind Datadog's .NET profiler, focusing on its continuous profiling capabilities. It explains the profiler's architecture, including samplers, providers, aggregators, and exporters, and how it generates .pprof files. It also covers backend processing, including associating profiles with traces and spans using runtime IDs, and the techniques used to clean up .NET call stacks for improved readability. The implementation details highlight the use of native code (C++ and Rust) and its integration as an ICorProfilerCallback plugin during application startup.
More from the Java CPU Profiling trail
- How we built an async-aware Python profiler | Datadog
- Unbiased Java CPU profiling with JFR in JDK 25 | Datadog
- From hand-tuned Go to self-optimizing code: Building BitsEvolve | Datadog
- How we tracked down a Go 1.24 memory regression across hundreds of pods | Datadog
- .NET Continuous Profiler: Exception and lock contention | Datadog