Class: Karafka::Web::Tracking::Consumers::Listeners::Tags
- Defined in:
- lib/karafka/web/tracking/consumers/listeners/tags.rb
Overview
Note:
We cannot attach here certain the ActiveJob consumer tags and they need to be in Karafka itself (mainly the per AJ job tag) because from the outside consumer perspective we have a single consumption that can run multiple different AJ jobs
Note:
We can assign tags here and the order of tracking listeners does not matter, because tags state for consumers is materialized in the moment of reporting.
Listener used to attach tags to consumers for Web-UI usage. Those tags will be picked up by another listener
Instance Method Summary collapse
Instance Method Details
#on_consumer_consume(event) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/karafka/web/tracking/consumers/listeners/tags.rb', line 19 def on_consumer_consume(event) consumer = event.payload[:caller] tag_active_job(consumer) tag_attempt(consumer) return unless Karafka.pro? tag_virtual_partitions(consumer) tag_long_running_job(consumer) end |