Skip to content

Consolidate redis channel integrations into one integration in @sentry/server-utils #22627

Description

@andreiborza

Problem

Channel-based redis instrumentation is currently split across three integrations with distinct names:

Integration name Mechanism Covers
redisIntegration (server-utils native; node wraps it) Redis native diagnostics_channel ioredis >=5.11.0, node-redis >=5.12.0 (+ batches)
ioredisChannelIntegration IORedis orchestrion injected channels ioredis <5.11.0
redisChannelIntegration RedisChannel orchestrion injected channels redis v2-v3, node-redis v4/v5 <5.12.0 (@redis/client)

@sentry/node's default set spreads all three via redisChannelIntegrations(). Two consequences (flagged by Cursor Bugbot on #22501):

  1. Disable-by-name is leaky: removing only the Redis integration from defaults leaves IORedis + RedisChannel subscribers running, so redis tracing isn't fully turned off.
  2. Single public export under-covers: an app using redisIntegration() alone (e.g. with defaultIntegrations: false) gets only the native (Redis) coverage and silently loses spans for older redis/ioredis clients.

Cross-runtime angle: the two orchestrion integrations live in @sentry/server-utils (shared), but only node's default set wires all three. @sentry/bun imports just the native redisIntegration, so bun already has the older-client gap. Cloudflare ships no redis.

Proposal

Consolidate into a single redisIntegration in @sentry/server-utils that internally registers the native diagnostics-channel subscriber plus both orchestrion subscribers (one name: 'Redis'). Then:

  • node's default set uses the single integration; drop redisChannelIntegrations().
  • disabling Redis fully turns off redis tracing.
  • redisIntegration() alone covers all supported client versions.
  • bun (and future runtimes) get full coverage from the one integration for free.

Keep the node cache responseHook wiring. The vendored OTel fallback is removed separately (#22346).

Found by Cursor Bugbot on PR #22501 (2x Medium). Pre-existing to the channel-default rewire (the 3-way split predates it).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions