log: implement flag that outputs all log messages as structured JSON #44755
Labels
A-logging
In and around the logging infrastructure.
A-monitoring
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
O-community
Originated from the community
Our current log format is nicely dense, and our engineers are used to it. According to @piyush-singh, the format can be daunting for users, some of whom have wished that we logged in more of a standard format. There is a lot of information and it isn't self-documenting in each log message.
It's becoming increasingly common for services to log in structured JSON. The CockroachDB server should accept a log format flag that permits our default and also structured JSON. When the log format is set to JSON, we should emit a JSONified payload. For example, instead of
We'd output
This should be relatively straightforward, and allow for easy log ingestion into observability systems like Splunk or Datadog.
The text was updated successfully, but these errors were encountered: