Sha256: 8ccfa0439f08bd33871bacdee1dad303444040b7e8c8e105c577c68bce085e01
Contents?: true
Size: 892 Bytes
Versions: 38
Compression:
Stored size: 892 Bytes
Contents
# encoding: utf-8 module OneApm module Collector class Sampler attr_reader :id @sampler_classes = [] class << self def named(new_name) @name = new_name end def name @name end def inherited(subclass) @sampler_classes << subclass end def supported_on_this_platform? true end def enabled? if @name config_key = "disable_#{@name}_sampler" !(Manager.config[config_key]) else true end end def sampler_classes @sampler_classes end end def initialize(id = nil) @id = id || self.class.name end def poll raise "Implement in the subclass" end class Unsupported < StandardError; end end end end
Version data entries
38 entries across 38 versions & 1 rubygems