Class: Gruf::Interceptors::Instrumentation::RequestLogging::Formatters::Logstash

Inherits:
Base
  • Object
show all
Defined in:
lib/gruf/interceptors/instrumentation/request_logging/formatters/logstash.rb

Overview

Formats logging for gruf services into a Logstash-friendly JSON format

Instance Method Summary collapse

Instance Method Details

#format(payload, request:, result:) ⇒ String

Format the request into a JSON-friendly payload

Parameters:

Returns:

  • (String)

    The JSON representation of the payload



37
38
39
# File 'lib/gruf/interceptors/instrumentation/request_logging/formatters/logstash.rb', line 37

def format(payload, request:, result:)
  payload.merge(format: 'json').to_json
end