<PackageReference Include="OpenTelemetry" Version="1.11.2" />

OpenTelemetry.Trace.Sampler

public abstract class Sampler
Controls the number of samples of traces collected and sent to the backend.
namespace OpenTelemetry.Trace { public abstract class Sampler { public string Description { get; set; } protected Sampler(); public abstract SamplingResult ShouldSample(SamplingParameters samplingParameters); } }