feat(observability): add structured application logging
Emit correlated JSON logs from the API and FunASR services, propagate request IDs to the client, and configure bounded opt-in Docker logging. Document the host-wide Grafana/Loki query workflow and keep observability deployment ownership outside the application repository.
This commit is contained in:
@@ -28,6 +28,8 @@ RUN --mount=type=cache,id=teaching-feedback-cargo-registry,target=/usr/local/car
|
||||
FROM debian:bookworm-slim AS runtime
|
||||
|
||||
ARG DEBIAN_MIRROR=http://deb.debian.org
|
||||
ARG APP_VERSION=0.2.0
|
||||
ARG GIT_SHA=unknown
|
||||
|
||||
RUN sed -i "s|http://deb.debian.org|${DEBIAN_MIRROR}|g" /etc/apt/sources.list.d/debian.sources \
|
||||
&& apt-get update \
|
||||
@@ -44,7 +46,11 @@ COPY --from=builder /build/output/migrate-user-owner /usr/local/bin/migrate-user
|
||||
ENV HOST=0.0.0.0 \
|
||||
PORT=8080 \
|
||||
AUDIO_STORAGE_DIR=/data/audio \
|
||||
RUST_LOG=info
|
||||
RUST_LOG=info \
|
||||
APP_ENV=lan \
|
||||
APP_VERSION=${APP_VERSION} \
|
||||
GIT_SHA=${GIT_SHA} \
|
||||
LOG_FORMAT=json
|
||||
|
||||
USER app
|
||||
|
||||
|
||||
Reference in New Issue
Block a user