<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.
public string Description { get; protected set; }

Gets or sets the sampler description.

protected Sampler()

Initializes a new instance of the Sampler class.

public abstract SamplingResult ShouldSample(SamplingParameters& modreq(System.Runtime.InteropServices.InAttribute) samplingParameters)