Sha256: 6573755f2fe7904a19d56baa14e7427f77fab79f7d5e0dc55f5c63f6156e70b1

Contents?: true

Size: 1020 Bytes

Versions: 6

Compression:

Stored size: 1020 Bytes

Contents

# Copyright 2017 OpenCensus Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

module OpenCensus
  module Trace
    module Samplers
      ##
      # The AlwaysSample sampler always returns true.
      #
      class AlwaysSample
        ##
        # Implements the sampler contract. Checks to see whether a sample
        # should be taken at this time.
        #
        # @return [boolean] Whether to sample at this time.
        #
        def call _opts = {}
          true
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
opencensus-0.3.1 lib/opencensus/trace/samplers/always_sample.rb
opencensus-0.3.0 lib/opencensus/trace/samplers/always_sample.rb
opencensus-0.2.2 lib/opencensus/trace/samplers/always_sample.rb
opencensus-0.2.1 lib/opencensus/trace/samplers/always_sample.rb
opencensus-0.2.0 lib/opencensus/trace/samplers/always_sample.rb
opencensus-0.1.0 lib/opencensus/trace/samplers/always_sample.rb