-
Notifications
You must be signed in to change notification settings - Fork 277
Closed
Description
Hi,
I am aware of the built-in samplers:
always_on - Sampler that always samples spans, regardless of the parent span’s sampling decision.
always_off - Sampler that never samples spans, regardless of the parent span’s sampling decision.
traceidratio - Sampler that samples probabalistically based on rate.
parentbased_always_on - (default) Sampler that respects its parent span’s sampling decision, but otherwise always samples.
parentbased_always_off - Sampler that respects its parent span’s sampling decision, but otherwise never samples.
parentbased_traceidratio - Sampler that respects its parent span’s sampling decision, but otherwise samples probabalistically based on rate.
But I'd like to understand how to use a custom sampler?
I currently have the following:
sampler = CustomSampler.new(sampling_probability)
trace_provider = OpenTelemetry::SDK::Trace::TracerProvider.new(sampler: sampler)
OpenTelemetry.tracer_provider = trace_provider
But these lines of code don't seem to be taking effect. Any guidance?
Metadata
Metadata
Assignees
Labels
No labels