Allow configuration of the message key in structured logs #16241
Labels
feature request
Requests for new plugin and for new features to existing plugins
waiting for response
waiting for response from contributor
Use Case
This feature would enable configuration of the message key used for structured logging, which currently defaults to
slog.MessageKey
(which is"msg"
.A number of log ingestion pipelines rely on the key being
"message"
.It would be very helpful to be able to configure this value without having to rely on another tool, such as fluentbit, to transform the logs.
My current use case would benefit from not having to add this additional overhead, when it's arguably not necessary.
Expected behavior
This will allow a config option,
structured_log_message_key
, or similar, which when set to a different value, such asmessage
(instead of the defaultmsg
), would produce structured logs in the following format:Actual behavior
This functionality is currently not yet available, so the logs would continue to be produced as follows:
Additional info
No response
The text was updated successfully, but these errors were encountered: