Both init_tracing_subscriber() and init_otlp() were calling try_init() on the global tracing dispatcher, causing "global default trace dispatcher has already been set" at runtime when APP_OTEL_ENABLED=true. Fix: simplify the API so init_tracing_subscriber() never installs the subscriber — it either calls try_init() immediately (non-OTLP mode) or returns without installing (OTLP mode, defer=true). init_otlp() now builds the complete subscriber stack (registry + env_filter + fmt_layer + otel_layer) and calls try_init() once. init_tracing_subscriber() signature: (level, defer) → () init_otlp() signature: (endpoint, service_name, _, log_level) → Result The fmt layer is replicated inside init_otlp() for the OTLP path. |
||
|---|---|---|
| .. | ||
| agent | ||
| agent-tool-derive | ||
| api | ||
| avatar | ||
| config | ||
| db | ||
| frontend | ||
| git | ||
| migrate | ||
| models | ||
| observability | ||
| queue | ||
| room | ||
| rpc | ||
| service | ||
| session | ||
| session_manager | ||
| transport | ||
| webhook | ||