Improve logging
CharlieC3 opened this issue · 0 comments
CharlieC3 commented
The following changes to the logging would have large effects downstream in our observability tools:
- Format logs in JSON - This would help our internal infra categorize and sort any keys found in the JSON log.
- Implement a logging standard and structure. Using common keys like
msg
to provide the primary message of a log, andlevel
to provide the logging level, etc would also help the downstream infrastructure.
Without these improvements, logs will be harder to search for and visualize in Grafana. Refer to the Platform API's logging structure for guidance:
{"level":"info","time":1699368500392,"pid":104,"hostname":"<internal_hostname>","reqId":"req-2q7","req":{"method":"GET","url":"/ping","hostname":"<external_hostname>,"remoteAddress":"10.1.130.44","remotePort":51265},"msg":"incoming request"}