Class: Sqreen::Ecosystem::Messaging::Kinesis

Inherits:
Object
  • Object
show all
Includes:
Loggable, Sqreen::Ecosystem::ModuleApi::Instrumentation, Sqreen::Ecosystem::ModuleApi::MessageProducer
Defined in:
lib/sqreen/ecosystem/messaging/kinesis.rb

Instance Attribute Summary

Attributes included from Sqreen::Ecosystem::ModuleApi::MessageProducer

#tracing_broker

Instance Method Summary collapse

Methods included from Sqreen::Ecosystem::ModuleApi::Instrumentation

included

Instance Method Details

#setupObject



21
22
23
24
25
26
27
28
29
# File 'lib/sqreen/ecosystem/messaging/kinesis.rb', line 21

def setup
  advice_send = wrap_for_interest(ModuleApi::Tracing::ProducerData, &method(:after_send_advice))
  advice_receive = wrap_for_interest(ModuleApi::Tracing::ConsumerData, &method(:after_receive_advice))
  instrument 'Aws::Kinesis::Client#put_record',  after: advice_send
  instrument 'Aws::Kinesis::Client#put_records', after: advice_send
  # more sophisticated usages (register_stream_consumer, possibly with AsyncClient)
  # are not supported. They are more difficult to test, as kinesalite doesn't support them
  instrument 'Aws::Kinesis::Client#get_shard_iterator', after: advice_receive
end