A log line per request, and every API error logged once
Live on preview.zitadel.comReleased in v0.2.0
A self-hosted server's logs now tell a request in one line, and an error in one more.
- One
INFOline per request,request served, with its method, its path without the query, its operation id, status, size and duration and, inside a sampled trace,TraceIDandSpanID. Thehandling requestline and theerror_codefield are gone. - Every error the API returns is logged once, as an
api errorline with the status, the operation, and the error's code, message and cause: a 5xx atERROR, with its location, and a 4xx atINFO. A handler that panics before responding now answers500internalinstead of closing the connection. - Stack traces are off by default. Set
instrumentation.log.errors.stack_trace: true(NEXTGEN_INSTRUMENTATION_LOG_ERRORS_STACK_TRACE=true) while debugging. - Removing a stream from
instrumentation.log.streamsnow drops that stream's lines, andinstrumentation.log.add_sourceapplies to every line. - A server that fails to start logs why at
ERROR, in the configured log format, so the reason also shows withinstrumentation.log.level: warn. instrumentation.trace.trust_remote_spans: true(NEXTGEN_INSTRUMENTATION_TRACE_TRUST_REMOTE_SPANS) continues a caller's W3Ctraceparenttrace; it was accepted before but did nothing. It trusts the caller's sampled flag overinstrumentation.trace.fraction, so turn it on only behind a proxy or mesh you control.