Class: Karafka::Pro::Instrumentation::Callbacks::ConsumerGroups::Decorator
- Inherits:
-
Instrumentation::Callbacks::ConsumerGroups::Decorator
- Object
- Core::Monitoring::StatisticsDecorator
- Instrumentation::Callbacks::ConsumerGroups::Decorator
- Karafka::Pro::Instrumentation::Callbacks::ConsumerGroups::Decorator
- Defined in:
- lib/karafka/pro/instrumentation/callbacks/consumer_groups/decorator.rb
Overview
Pro statistics decorator for consumer groups. On top of the standard decoration
(deltas, freeze durations) it invokes Pro statistics enrichments, each encapsulated
in its own component with a #call entrypoint. Currently: the lag compensation of
long-paused partitions.
Instance Method Summary collapse
-
#call(statistics) ⇒ Hash
Decorated statistics with the Pro enrichments applied.
-
#initialize ⇒ Decorator
constructor
A new instance of Decorator.
Constructor Details
#initialize ⇒ Decorator
Returns a new instance of Decorator.
43 44 45 46 |
# File 'lib/karafka/pro/instrumentation/callbacks/consumer_groups/decorator.rb', line 43 def initialize super @lag_compensator = Pro::Instrumentation::ConsumerGroups::LagCompensation::Compensator.new end |
Instance Method Details
#call(statistics) ⇒ Hash
Note:
When the lag compensation is disabled, its refresher is not subscribed and the registry stays empty, so the compensation is a pass-through by itself
Returns decorated statistics with the Pro enrichments applied.
53 54 55 56 57 |
# File 'lib/karafka/pro/instrumentation/callbacks/consumer_groups/decorator.rb', line 53 def call(statistics) @lag_compensator.call(statistics) super end |