Class: Gruf::Interceptors::Instrumentation::RequestLogging::Formatters::Logstash
- Inherits:
-
Base
- Object
- Base
- Gruf::Interceptors::Instrumentation::RequestLogging::Formatters::Logstash
- 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
-
#format(payload, request:, result:) ⇒ String
Format the request into a JSON-friendly payload.
Instance Method Details
#format(payload, request:, result:) ⇒ String
Format the request into a JSON-friendly 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 |