Add optional OpenTelemetry traces, metrics and OTLP logs

This commit is contained in:
2026-10-23 06:09:43 +00:00
parent 57c810ea65
commit 4ed14b42a7
8 changed files with 813 additions and 11 deletions
+13
View File
@@ -38,6 +38,19 @@ KEYGEN_CONCURRENCY=2
SESSION_COOKIE_SECURE=false
#LOGGING_CONFIG=
# --- OpenTelemetry (optional) ----------------------------------------------
# The Docker image includes the 'otel' extra. Non-image installs need:
# uv sync --package kca-app --extra otel
# Export targets are OTLP/HTTP; the /v1/traces, /v1/metrics and /v1/logs
# paths are appended automatically.
OTEL_ENABLED=false
OTEL_SERVICE_NAME=kca
#OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
#OTEL_EXPORTER_OTLP_HEADERS=Authorization=Bearer token,X-Tenant=one
OTEL_EXCLUDED_PATHS=/api/health
#OTEL_METRIC_EXPORT_INTERVAL_MILLIS=60000
#OTEL_METRICS_POLL_INTERVAL_SECONDS=15
# --- CORS (optional) -------------------------------------------------------
#CORS_ALLOW_ORIGINS=
#CORS_ALLOW_ORIGIN_REGEX=