Sha256: ee7d5befa3e3f79941467ad2eceac8b208a9e97b6c64282136c32df49ea4d703
Contents?: true
Size: 612 Bytes
Versions: 8
Compression:
Stored size: 612 Bytes
Contents
# frozen_string_literal: true module Jaeger module Client module Samplers # Const sampler # # A sampler that always makes the same decision for new traces depending # on the initialization value. Use `Jaeger::Client::Samplers::Const.new(true)` # to mark all new traces as sampled. class Const def initialize(decision) @decision = decision @param = decision ? '1' : '0' end def sample?(*) @decision end def type 'const' end attr_reader :param end end end end
Version data entries
8 entries across 8 versions & 2 rubygems