gitdataai/libs
ZhenYi 8defac98ad fix(observability): resolve tracing double-init runtime panic
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.
2026-04-22 23:28:56 +08:00
..
agent feat(gRPC): migrate admin RPC from Redis Pub/Sub to Tonic gRPC 2026-04-22 22:39:06 +08:00
agent-tool-derive init 2026-04-15 09:08:09 +08:00
api feat(user): add Activity, Following, Stars, Security tabs to profile page 2026-04-22 22:39:14 +08:00
avatar init 2026-04-15 09:08:09 +08:00
config feat(observability): Phase 6 OTLP tracing for gRPC + config helper 2026-04-21 23:05:37 +08:00
db init 2026-04-15 09:08:09 +08:00
email refactor(core): migrate session_manager, email, rpc from slog to tracing 2026-04-21 22:29:43 +08:00
frontend chore(frontend): update frontend build configuration 2026-04-20 15:45:35 +08:00
git refactor(git): migrate libs/git from slog to tracing 2026-04-21 22:29:26 +08:00
migrate feat(observability): Phase 6 OTLP tracing + Prometheus metrics endpoint 2026-04-22 10:27:54 +08:00
models feat(observability): Phase 6 OTLP tracing + Prometheus metrics endpoint 2026-04-22 10:27:54 +08:00
observability fix(observability): resolve tracing double-init runtime panic 2026-04-22 23:28:56 +08:00
queue refactor(queue): migrate from slog to tracing 2026-04-21 22:29:09 +08:00
room feat(observability): Phase 6 OTLP tracing + Prometheus metrics endpoint 2026-04-22 10:27:54 +08:00
rpc feat(gRPC): migrate admin RPC from Redis Pub/Sub to Tonic gRPC 2026-04-22 22:39:06 +08:00
service feat(user): add Activity, Following, Stars, Security tabs to profile page 2026-04-22 22:39:14 +08:00
session feat(admin): add admin panel with billing alerts and model sync 2026-04-19 20:48:59 +08:00
session_manager feat(observability): Phase 6 OTLP tracing for gRPC + config helper 2026-04-21 23:05:37 +08:00
transport init 2026-04-15 09:08:09 +08:00
webhook init 2026-04-15 09:08:09 +08:00