Closed ijdickinson closed 3 years ago
Also have this kind of event. https://kibana-fsa.epimorphics.net/app/kibana#/discover/doc/logstash-*/logstash-default-2021.01.27-000001?id=PmGFRHcBBtbYVXFE3eJn
{"level":"INFO","timestamp":"2021-01-27 15:45:54","rails_environment":"production","message":"server: \"nginx/1.19.1\"\ndate: \"Wed, 27 Jan 2021 15:45:54 GMT\"\ncontent-type: \"application/json\"\ntransfer-encoding: \"chunked\"\nconnection: \"keep-alive\"\nvary: \"Accept-Encoding, Accept, Origin\"\nsleuth-trace-id: \"5988fc18ed2f5bd1\"\nsleuth-span-id: \"5988fc18ed2f5bd1\"\ncache-control: \"max-age=1200\"\nx-cache-status: \"HIT\""}
Which results in
log_message=
server: "nginx/1.19.1"
date: "Wed, 27 Jan 2021 15:45:54 GMT"
content-type: "application/json"
transfer-encoding: "chunked"
connection: "keep-alive"
vary: "Accept-Encoding, Accept, Origin"
sleuth-trace-id: "5988fc18ed2f5bd1"
sleuth-span-id: "5988fc18ed2f5bd1"
cache-control: "max-age=1200"
x-cache-status: "HIT"
The kibana log output is about the richest example were have of prior art. It might server as a pattern.
Done and should be in release 0.2.0 👌
At the moment, we place all logged fields at the top level of the JSON structure:
Following a suggestion from @andrew-pickin-epi, we will nest output keys that Rails-specific under a sub-key:
Common keys will remain at the top level. Keys with
null
values will be removed altogether.