You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Redis diagnostics_channel subscriber creates root spans for commands outside any active span #25793
@sentry/node 10.75.0 / 10.76.2 (@sentry/server-utils same), also present in 11.9.0. ioredis 5.11.1 and 6.0.0 (both publish ioredis:command / ioredis:connect).
Description
server-utils/src/redis/redis-dc-subscriber binds ioredis:command, ioredis:connect and the node-redis:* channels with bindTracingChannelToSpan(...) and calls startInactiveSpan unconditionally. A command issued outside an active span (a blocking XREAD loop from @socket.io/redis-streams-adapter, the ioredis Cluster slot refresh every slotsRefreshInterval, background jobs) therefore starts a new trace, and tracesSampler samples it as a root transaction named redis-xread, redis-connect, redis-cluster, …
The OpenTelemetry-based ioredis instrumentation this replaces only created a span when getActiveSpan() was set, and bindTracingChannelToSpan already supports requiresParentSpan, but the Redis subscriber does not pass it.
Impact for us: about 926k sampled root transactions per 7 days across 9 Node services, the largest single source of span volume.
Expected
Redis command and connect spans are created only when there is an active parent span (requiresParentSpan: true), matching the previous OTel instrumentation behaviour; or an option to require a parent.
Workaround
tracesSampler: ({ name, inheritOrSampleWith }) => name.startsWith('redis-') ? 0 : inheritOrSampleWith(rate). On 11.x the op changes to db.query, and the span name may change too (streamedName, cache names), so a name-based workaround is fragile across majors.
Activity
linear-code commentedon Oct 28, 2026
JS-4016
nicohrubec commentedon Nov 6, 2026
Hey, thanks for writing in. We are discussing internally how we'll handle such cases in the future, we'll keep you posted.