Sha256: 792c8b188ba8c19ec788beca2386be0c90c4e7e3dae1b584bbb16b05099b0969

Contents?: true

Size: 828 Bytes

Versions: 17

Compression:

Stored size: 828 Bytes

Contents

# frozen_string_literal: true

module Karafka
  module Web
    module Tracking
      module Consumers
        # Consumer monitoring related listeners
        module Listeners
          # Base consumers processes related listener
          class Base
            include ::Karafka::Core::Helpers::Time
            extend Forwardable

            def_delegators :sampler, :track
            def_delegators :reporter, :report, :report!

            private

            # @return [Object] sampler in use
            def sampler
              @sampler ||= ::Karafka::Web.config.tracking.consumers.sampler
            end

            # @return [Object] reported in use
            def reporter
              @reporter ||= ::Karafka::Web.config.tracking.reporter
            end
          end
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
karafka-web-0.5.2 lib/karafka/web/tracking/consumers/listeners/base.rb
karafka-web-0.5.1 lib/karafka/web/tracking/consumers/listeners/base.rb
karafka-web-0.5.0 lib/karafka/web/tracking/consumers/listeners/base.rb
karafka-web-0.4.1 lib/karafka/web/tracking/consumers/listeners/base.rb
karafka-web-0.4.0 lib/karafka/web/tracking/consumers/listeners/base.rb
karafka-web-0.3.1 lib/karafka/web/tracking/consumers/listeners/base.rb
karafka-web-0.3.0 lib/karafka/web/tracking/consumers/listeners/base.rb
karafka-web-0.2.5 lib/karafka/web/tracking/consumers/listeners/base.rb
karafka-web-0.2.4 lib/karafka/web/tracking/consumers/listeners/base.rb
karafka-web-0.2.3 lib/karafka/web/tracking/consumers/listeners/base.rb
karafka-web-0.2.2 lib/karafka/web/tracking/consumers/listeners/base.rb
karafka-web-0.2.1 lib/karafka/web/tracking/consumers/listeners/base.rb
karafka-web-0.2.0 lib/karafka/web/tracking/consumers/listeners/base.rb
karafka-web-0.1.3 lib/karafka/web/tracking/consumers/listeners/base.rb
karafka-web-0.1.2 lib/karafka/web/tracking/consumers/listeners/base.rb
karafka-web-0.1.1 lib/karafka/web/tracking/consumers/listeners/base.rb
karafka-web-0.1.0 lib/karafka/web/tracking/consumers/listeners/base.rb