diff --git a/ruby_event_store/lib/ruby_event_store/instrumented_repository.rb b/ruby_event_store/lib/ruby_event_store/instrumented_repository.rb index 384452e7f2..b2133a1794 100644 --- a/ruby_event_store/lib/ruby_event_store/instrumented_repository.rb +++ b/ruby_event_store/lib/ruby_event_store/instrumented_repository.rb @@ -8,7 +8,7 @@ def initialize(repository, instrumentation) end def append_to_stream(records, stream, expected_version) - instrumentation.instrument("append_to_stream.repository.ruby_event_store", events: records, stream: stream) do + instrumentation.instrument("append_to_stream.repository.ruby_event_store", records: records, stream: stream) do repository.append_to_stream(records, stream, expected_version) end end @@ -37,9 +37,9 @@ def count(specification) end end - def update_messages(messages) - instrumentation.instrument("update_messages.repository.ruby_event_store", messages: messages) do - repository.update_messages(messages) + def update_messages(records) + instrumentation.instrument("update_messages.repository.ruby_event_store", records: records) do + repository.update_messages(records) end end diff --git a/ruby_event_store/spec/instrumented_repository_spec.rb b/ruby_event_store/spec/instrumented_repository_spec.rb index bd583e914b..65e50bdb87 100644 --- a/ruby_event_store/spec/instrumented_repository_spec.rb +++ b/ruby_event_store/spec/instrumented_repository_spec.rb @@ -24,7 +24,9 @@ module RubyEventStore subscribe_to("append_to_stream.repository.ruby_event_store") do |notification_calls| instrumented_repository.append_to_stream([record], stream, expected_version) - expect(notification_calls).to eq([{ events: [record], stream: stream }]) + expect(notification_calls).to eq([ + { records: [record], stream: stream } + ]) end end end @@ -143,7 +145,9 @@ module RubyEventStore subscribe_to("update_messages.repository.ruby_event_store") do |notification_calls| instrumented_repository.update_messages([record]) - expect(notification_calls).to eq([{ messages: [record] }]) + expect(notification_calls).to eq([ + { records: [record] } + ]) end end end