From 6b711c4ccc301f72e37b7b17b2a9efe597038068 Mon Sep 17 00:00:00 2001 From: Sergei Maertens Date: Fri, 9 Jan 2026 15:41:26 +0100 Subject: [PATCH] Avoid using `event` key in uwsgi logs Updated from `event` to `msg` for high-cardinality log messages, so that we can enable indexing on the `event` key. --- bin/uwsgi.ini | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/uwsgi.ini b/bin/uwsgi.ini index 7ad34bad..d73d3dc8 100644 --- a/bin/uwsgi.ini +++ b/bin/uwsgi.ini @@ -16,8 +16,9 @@ log-route = uwsgilogger ^((?!\{).)*$ ; leave already JSON formatted django logs as is log-encoder = format:djangologger ${msg} -; Encode uWSGI server logs as JSON -log-encoder = json:uwsgilogger {"source": "uwsgi", "type": "server", "timestamp": "${strftime:%%Y-%%m-%%dT%%H:%%M:%%S%%z}", "event": "${msg}", "level": "info"} +; Encode uWSGI server logs as JSON - deliberately using msg instead of event due to +; high cardinality of this key/label. +log-encoder = json:uwsgilogger {"source": "uwsgi", "type": "server", "timestamp": "${strftime:%%Y-%%m-%%dT%%H:%%M:%%S%%z}", "msg": "${msg}", "level": "info"} ; these are uwsgi's own request logs (not to be confused with the request logs emitted ; by the application!)