123456789_123456789_123456789_123456789_123456789_

Module: ActiveSupport::EventReporter::MessagePackEncoder

Overview

::ActiveSupport::EventReporter encoder for serializing events to ::ActiveSupport::MessagePack format.

Class Method Summary

Class Method Details

.encode(event)

[ GitHub ]

  
# File 'activesupport/lib/active_support/event_reporter/message_pack_encoder.rb', line 17

def encode(event)
  event[:payload] = event[:payload].to_h
  event[:tags] = event[:tags].transform_values do |value|
    value.respond_to?(:to_h) ? value.to_h : value
  end
  ::MessagePack.pack(event)
end