Module: Langfuse::Sampling Private
- Defined in:
- lib/langfuse/sampling.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Shared sampling helpers for trace and score emission.
Class Method Summary collapse
-
.build_sampler(sample_rate) ⇒ OpenTelemetry::SDK::Trace::Samplers::TraceIdRatioBased?
private
Build the sampler used by both trace export and trace-linked score emission.
Class Method Details
.build_sampler(sample_rate) ⇒ OpenTelemetry::SDK::Trace::Samplers::TraceIdRatioBased?
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Build the sampler used by both trace export and trace-linked score emission.
14 15 16 17 18 |
# File 'lib/langfuse/sampling.rb', line 14 def build_sampler(sample_rate) return nil if sample_rate >= 1.0 OpenTelemetry::SDK::Trace::Samplers::TraceIdRatioBased.new(sample_rate) end |