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

OpenTelemetry.Trace.SamplingParameters

public struct SamplingParameters
Sampling parameters passed to a Sampler for it to make a sampling decision.
public ActivityKind Kind { get; }

Gets the kind of span/activity to be created.

public IEnumerable<ActivityLink> Links { get; }

public string Name { get; }

Gets the name to be given to the span/activity.

Gets the parent activity context.

public IEnumerable<KeyValuePair<string, object>> Tags { get; }

Gets the tags to be associated to the span/activity to be created. These are the tags provided at the time of Activity creation.

public ActivityTraceId TraceId { get; }

Gets the trace ID of parent activity or a new generated one for root span/activity.

public SamplingParameters(ActivityContext parentContext, ActivityTraceId traceId, string name, ActivityKind kind, IEnumerable<KeyValuePair<string, object>> tags = null, IEnumerable<ActivityLink> links = null)

Initializes a new instance of the SamplingParameters struct.