Skip to content

Commit 421cea1

Browse files
committed
fix: [#2831] remove --lazy-apps to unbreak OpenTelemetry setup in web
maykin_common.otel.setup_otel() detects uwsgi and defers its real initialization to a uwsgidecorators.postfork hook -- correct for uWSGI's default prefork model, but --lazy-apps loads the app in each worker *after* it's already forked, so that hook has no future fork event to attach to and never fires. OTel silently never initializes for this process, dropping every metric/trace it would otherwise record, while Celery (no uwsgi involved) exports fine -- which is why only Celery-attributed data ever showed up. --lazy-apps was added in 781af34 to fix Python 3.13 segfaults at the fork boundary. Removing it trades that fix for working observability; if the segfaults resurface, the better fix is teaching maykin_common to skip the postfork deferral when uwsgi.opt indicates lazy-apps, rather than reintroducing this. Closes: #2831
1 parent 7d4a1b4 commit 421cea1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

bin/docker_start.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,11 @@ export UWSGI_POST_BUFFERING=${UWSGI_POST_BUFFERING:-8192}
7373
export UWSGI_BUFFER_SIZE=${UWSGI_BUFFER_SIZE:-65535}
7474

7575
# Start Server
76+
#
77+
# Avoid --lazy-apps as it breaks our otel setup hooks
7678
>&2 echo "Starting server"
7779
exec uwsgi \
7880
--show-config \
7981
--strict \
80-
--lazy-apps \
8182
--static-map /static=/app/static \
8283
--static-map /media=/app/media

0 commit comments

Comments
 (0)