class RubyEventStore::Mappers::InstrumentedMapper
Attributes
Public Class Methods
Source
# File lib/ruby_event_store/mappers/instrumented_mapper.rb, line 6 def initialize(mapper, instrumentation) @mapper = mapper @instrumentation = instrumentation end
Public Instance Methods
Source
# File lib/ruby_event_store/mappers/instrumented_mapper.rb, line 11 def event_to_record(event) instrumentation.instrument("serialize.mapper.rails_event_store", domain_event: event) do mapper.event_to_record(event) end end
Source
# File lib/ruby_event_store/mappers/instrumented_mapper.rb, line 17 def record_to_event(record) instrumentation.instrument("deserialize.mapper.rails_event_store", record: record) do mapper.record_to_event(record) end end