Overriding sampling rate in certain cases #1654
-
Is it possible to override the sampling rate, not decision, when you create a span without using the SDK part of When we create the tracer provider we create a Right now the SDK part of the consumer_tracer: opentelemetry.sdk.trace.Tracer = get_tracer(options.app_name, options.app_version)
consumer_tracer.sampler = ParentBasedTraceIdRatio(0.5) but then the application might crash if we use a |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@Gyllsdorff |
Beta Was this translation helpful? Give feedback.
@Gyllsdorff
I'm not sure how you would be able to do this since
Sampler
is an SDK concept. Perhaps you could make your own "overridable" custom Sampler that inherits fromSampler
and has some APIs that could change the sampling percentage during runtime?