feat: TracingChannel-powered observability
Draft
LO
6mo ago+1551+1551+0123456789012345678901234567890123456789-1347-1347-0123456789012345678901234567890123456789
Draft ā Visual comparison of TracingChannel changes on top of #3110
This PR shows the diff of the TracingChannel refactoring on top of the OTel metrics PR (redis/node-redis#3110).
What changed
Core code no longer calls OTel metrics directly. Instead it describes what's happening through diagnostics_channel:
trace()ā wraps async operations (commands, batches, connections, pool waits) viaTracingChannelpublish()ā emits point events (errors, cache hits, pubsub, maintenance) viadc.channel()
OTel metrics subscribe to these channels externally. Any APM (Sentry, Datadog, custom) can do the same ā zero additional surgery to core code.
Key numbers
- -312 lines removed from existing production code
- +291 lines new
tracing.tsinfrastructure (serves all consumers) - Net -21 lines of production code
- Zero
OTelMetricsimports in core code - Two functions for all observability:
trace()andpublish()
š¤ Generated with Claude Code