Class: Karafka::Web::Tracking::Consumers::Sampler::Enrichers::ConsumerGroups
- Inherits:
-
Base
- Object
- Base
- Karafka::Web::Tracking::Consumers::Sampler::Enrichers::ConsumerGroups
- Includes:
- Core::Helpers::Time
- Defined in:
- lib/karafka/web/tracking/consumers/sampler/enrichers/consumer_groups.rb
Overview
Enriches consumer groups data with polling details and transactional consumer handling This is responsible for materializing time-based data and filling statistical gaps for transactional consumers
Instance Method Summary collapse
-
#call ⇒ Hash
Enriches consumer groups with polling details and transactional consumer offsets.
-
#initialize(consumer_groups, subscription_groups) ⇒ ConsumerGroups
constructor
A new instance of ConsumerGroups.
Constructor Details
#initialize(consumer_groups, subscription_groups) ⇒ ConsumerGroups
Returns a new instance of ConsumerGroups.
17 18 19 20 21 |
# File 'lib/karafka/web/tracking/consumers/sampler/enrichers/consumer_groups.rb', line 17 def initialize(consumer_groups, subscription_groups) super() @consumer_groups = consumer_groups @subscription_groups = subscription_groups end |
Instance Method Details
#call ⇒ Hash
Enriches consumer groups with polling details and transactional consumer offsets
25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/karafka/web/tracking/consumers/sampler/enrichers/consumer_groups.rb', line 25 def call consumer_groups.each_value do |cg_details| cg_details.each do cg_details.fetch(:subscription_groups, {}).each do |sg_id, sg_details| enrich_subscription_group(sg_id, sg_details) end end end consumer_groups end |