Sha256: 7d52c6dd357fc6d2eb693bff242586da80789bcfa50a75ef3c6a3d8de535549b

Contents?: true

Size: 415 Bytes

Versions: 2

Compression:

Stored size: 415 Bytes

Contents

require_relative 'sampler'

module Datadog
  module Tracing
    module Sampling
      # {Datadog::Tracing::Sampling::AllSampler} samples all the traces.
      # @public_api
      class AllSampler < Sampler
        def sample?(_trace)
          true
        end

        def sample!(trace)
          trace.sampled = true
        end

        def sample_rate(*_)
          1.0
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ddtrace-1.10.1 lib/datadog/tracing/sampling/all_sampler.rb
ddtrace-1.10.0 lib/datadog/tracing/sampling/all_sampler.rb