Skip to content

feat(node): use ioredis tracing channels#21187

Open
logaretm wants to merge 1 commit into
developfrom
awad/ioredis-tracing-channels
Open

feat(node): use ioredis tracing channels#21187
logaretm wants to merge 1 commit into
developfrom
awad/ioredis-tracing-channels

Conversation

@logaretm
Copy link
Copy Markdown
Member

@logaretm logaretm commented May 27, 2026

ioredis 5.11 released tracing channels so we can start using them in the integration, I followed the same strategy we established with redis client by limiting the patching to older releases and subscribing anyways which will be inert except for newer releases.

I added similar tests as well to ensure both dc and non-dc paths still work.

This is not to be confused with the redis client, there is two of them, redis and ioredis, the latter being older but more popular.

Co-Authored-By: GPT-5 Codex <codex@openai.com>
@github-actions
Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 27.27 kB - -
@sentry/browser - with treeshaking flags 25.69 kB - -
@sentry/browser (incl. Tracing) 45.27 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 47.51 kB - -
@sentry/browser (incl. Tracing, Profiling) 50.25 kB - -
@sentry/browser (incl. Tracing, Replay) 84.87 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 74.38 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 89.59 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 102.2 kB - -
@sentry/browser (incl. Feedback) 44.46 kB - -
@sentry/browser (incl. sendFeedback) 32.09 kB - -
@sentry/browser (incl. FeedbackAsync) 37.21 kB - -
@sentry/browser (incl. Metrics) 28.37 kB - -
@sentry/browser (incl. Logs) 28.59 kB - -
@sentry/browser (incl. Metrics & Logs) 29.29 kB - -
@sentry/react 29.01 kB - -
@sentry/react (incl. Tracing) 47.5 kB - -
@sentry/vue 32.19 kB - -
@sentry/vue (incl. Tracing) 47.13 kB - -
@sentry/svelte 27.3 kB - -
CDN Bundle 29.68 kB - -
CDN Bundle (incl. Tracing) 47.8 kB - -
CDN Bundle (incl. Logs, Metrics) 31.17 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 49.05 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 70.48 kB - -
CDN Bundle (incl. Tracing, Replay) 85.3 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 86.45 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 91.17 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.33 kB - -
CDN Bundle - uncompressed 87.69 kB - -
CDN Bundle (incl. Tracing) - uncompressed 144.18 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 92.18 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 147.94 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 216.91 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 262.96 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 266.7 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 276.66 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 280.39 kB - -
@sentry/nextjs (client) 49.99 kB - -
@sentry/sveltekit (client) 45.75 kB - -
@sentry/core/server 76.44 kB - -
@sentry/core/browser 63.19 kB - -
@sentry/node-core 62.54 kB - -
@sentry/node 131.11 kB +0.04% +47 B 🔺
@sentry/node - without tracing 74.98 kB - -
@sentry/aws-serverless 87.2 kB +0.01% +1 B 🔺
@sentry/cloudflare (withSentry) - minified 173.4 kB - -
@sentry/cloudflare (withSentry) 433.33 kB - -

View base workflow run

@logaretm logaretm marked this pull request as ready for review May 27, 2026 13:05
@logaretm logaretm requested a review from a team as a code owner May 27, 2026 13:05
@logaretm logaretm requested review from JPeer264, andreiborza and isaacs and removed request for a team May 27, 2026 13:05
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 93cbcbb. Configure here.

);
setupConnectChannel(CHANNEL_REDIS_CONNECT);
setupCommandChannel<IORedisCommandData>(CHANNEL_IOREDIS_COMMAND, data => data.args);
setupBatchChannel<IORedisBatchData>(CHANNEL_IOREDIS_BATCH, () => 'MULTI');
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Subscription to nonexistent ioredis:batch channel is dead code

Low Severity

ioredis 5.11 only publishes two tracing channels: ioredis:command and ioredis:connect. There is no ioredis:batch channel — batch metadata (batchMode, batchSize) is included in the ioredis:command context instead. The setupBatchChannel call for CHANNEL_IOREDIS_BATCH, the IORedisBatchData interface, and the corresponding unit tests all exercise a code path that will never be triggered in production, creating a false impression that batch operations receive separate wrapping spans for ioredis.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 93cbcbb. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant