open-telemetry / opentelemetry-dotnet-instrumentation

OpenTelemetry .NET Automatic Instrumentation
https://opentelemetry.io
Apache License 2.0
360 stars 92 forks source link

CPU and memory allocation continuous profiler #3074

Open Kielek opened 10 months ago

Kielek commented 10 months ago

Feature Request

Note AlwaysOn Profiler is the name used as a product feature in Splunk. Broadly it is more known as a continuous profiles. It takes small portion of data every few seconds/events.

Implement CPU and memory profiler for .NET based on description in Splunk repository:

Most of the native code is stored under: https://github.com/signalfx/signalfx-dotnet-tracing/blob/main/tracer/src/Datadog.Trace.ClrProfiler.Native/always_on_profiler.cpp (and other prefixed by alwayson*). Most of the managed code part: https://github.com/signalfx/signalfx-dotnet-tracing/tree/main/tracer/src/Datadog.Trace/AlwaysOnProfiler Integration tests: https://github.com/signalfx/signalfx-dotnet-tracing/blob/main/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/AlwaysOnProfilerPprofTests.cs Tests application (covers all .NET languages): https://github.com/signalfx/signalfx-dotnet-tracing/tree/main/tracer/test/test-applications/integrations/Samples.AlwaysOnProfiler

pellared commented 10 months ago

I propose to add a pprof exporter as it could be useful for both the users as well as OTLP Profiler SIG for reference.