Company
Date Published
Author
Christophe Nasarre
Word count
2259
Language
English
Hacker News points
None

Summary

The .NET continuous profiler, a key component of Datadog's monitoring platform, is designed to collect profiling samples from managed threads in .NET applications. The profiler aims to identify performance bottlenecks and optimize CPU consumption. It uses thread sampling, stack walking, and symbolization to gather call stacks, labels, and context for each sample. The profiler has different implementations for Linux and Windows, addressing platform-specific challenges such as deadlocks and signal handling. Additionally, the profiler measures CPU impact of the garbage collector, computes accurate counts and durations based on sampled values, and provides labels with context information like appdomain name, thread ID, thread name, local root span ID, and trace endpoint. The profiler's performance optimizations include reducing CPU consumption by disabling wall time profiling or setting a lower threshold for configurations with less than one core.