Datadog's .NET continuous profiler provides detailed information on exceptions and lock contention, including exception type, thread ID, class name, and message, as well as lock duration and wait time. To achieve this without impacting the profiled application, the profiler uses sampling strategies to limit the number of events processed, such as reservoir sampling for exceptions and a discrete PID controller for lock contentions. The profiler also employs upscaling techniques to estimate real numbers based on sampled ones, providing a cumulative count and duration of exceptions and lock contentions that are often close to reality.