प्रेक्षणीयता
दो मार्ग हैं: stdout/stderr पर structured local logs और HTTP, durable jobs, counters तथा warning/error records के लिए optional OpenTelemetry exporter। Libre WebUI project को कुछ नहीं भेजा जाता; endpoint बिना OpenTelemetry बंद है। System और usage अलग हैं।
संरचित logs
LOG_FORMAT=text सामान्य text, LOG_FORMAT=json प्रति line JSON:
LOG_LEVEL=info
LOG_FORMAT=json
ISO time, level/scope, message, request/job correlation ID और सीमित details। हर HTTP request में X-Request-Id; 8–64 letters, digits, ., _, - accepted, अन्यथा UUID। Query string हटती है।
LOG_LEVEL: silent, error, warn, info, debug। Debug logs को data की तरह सुरक्षित रखें।
Redaction सीमा
Password/secret/token/key/authorization/cookie/credential/bearer/JWT जैसे fields हटते हैं; strings 512 characters; arrays, depth, attributes bounded; error केवल name और short message छोड़ता है। यह defense in depth है, prompts log करने की अनुमति नहीं। केवल ID और outcomes log करें, access और retention सीमित रखें।
OpenTelemetry
OTEL_EXPORTER_OTLP_ENDPOINT=https://otel-collector.example.com:4318
OTEL_EXPORTER_OTLP_HEADERS=authorization=Bearer example-collector-token
OTEL_SERVICE_NAME=libre-webui
URL में /v1/traces, /v1/metrics, /v1/logs जुड़ते हैं। OTEL_EXPORTER_OTLP_HEADERS comma-separated key=value list है। Secrets deployment secrets की तरह रखें। OTEL_SERVICE_NAME default libre-webui।
Endpoint न हो तो no-op। team में app और worker अलग export करते हैं।
Signals
HTTP spans/counters, durable-job spans/counters और correlation IDs वाले redacted warning/error records। Trace-parent propagation, cross-service trees या full browser/provider instrumentation नहीं। Token/media usage local analytics और costs में है।
Delivery
अधिकतम 2,048 spans/records, 512 series; लगभग 5 सेकंड flush; 3 सेकंड timeout। Error batch drop करता है, request नहीं तोड़ता। यह audit या accounting नहीं।
समस्या निवारण
OTEL_EXPORTER_OTLP_ENDPOINT, तीन standard paths और authorization=Bearer ... जाँचें। Environment बदलकर restart करें। Collector failure पर requests चलते रहना जानबूझकर है। Missing/truncated fields redaction के कारण हैं।