class RubyEventStore::Mappers::InstrumentedMapper
Attributes
instrumentation[R]
mapper[R]
Public Class Methods
new(mapper, instrumentation)
click to toggle source
# File lib/ruby_event_store/mappers/instrumented_mapper.rb, line 6 def initialize(mapper, instrumentation) @mapper = mapper @instrumentation = instrumentation end
Public Instance Methods
event_to_record(event)
click to toggle 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
record_to_event(record)
click to toggle 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