[META] Structured (JSON) logging for PostgreSQL
Structured logging would make it easier to ingest and search through logs. In particular this could be useful for searching for slow queries that may spread across multiple lines. We should investigate the options here and if deemed possible/useful enough implement it.
There are several steps to investigating and deploying this change:
-
Build the jsonlog module and manually install it on staging -
Decide on the destination path for the logs -
Evaluate the log output and fix any deficencies -
Configure ELK stack to ingest these logs -
gitlab-cookbooks/gitlab_fluentd!5 (comment 61734780) -
Ensure these logs are rotated and cleaned up after some retention period - View
-
-
Integrate jsonlog into omnibus -
Wait for omnibus with jsonlog to be deployed to production - [ ]
Unanswered questions:
-
Can we still use mtail or is there an alternate way to get metrics from logs?
Edited by Gregory Stark