lib/water_drop/producer/buffer.rb in waterdrop-2.0.7 vs lib/water_drop/producer/buffer.rb in waterdrop-2.1.0

- old
+ new

@@ -101,11 +101,16 @@ max_wait_timeout: @config.max_wait_timeout, wait_timeout: @config.wait_timeout ) end rescue *RESCUED_ERRORS => e - key = sync ? 'buffer.flushed_sync.error' : 'buffer.flush_async.error' - @monitor.instrument(key, producer_id: id, error: e, dispatched: dispatched) + @monitor.instrument( + 'error.occurred', + error: e, + producer_id: id, + dispatched: dispatched, + type: sync ? 'buffer.flushed_sync.error' : 'buffer.flush_async.error' + ) raise Errors::FlushFailureError.new(dispatched) end end end