Package Description
$ dotnet add package Pyroscope.OpenTelemetryThis package enables applications that already rely on OpenTelemetry for distributed tracing and Pyroscope for continuous profiling to link the tracing and profiling data together.
See https://grafana.com/docs/pyroscope/latest/configure-client/trace-span-profiles/ for more information.
Add the following package to your project:
dotnet add package Pyroscope.OpenTelemetry
Register the PyroscopeSpanProcessor in your OpenTelemetry integration:
builder.Services.AddOpenTelemetry()
.WithTracing(b =>
{
b
.AddAspNetCoreInstrumentation()
.AddConsoleExporter()
.AddOtlpExporter()
.AddProcessor(new Pyroscope.OpenTelemetry.PyroscopeSpanProcessor());
});