Skip to content

feat(server-utils): Migrate @opentelemetry/instrumentation-redis to orchestrion - #21925

Merged
chargome merged 6 commits into
developfrom
charlygomez/js-2416-rewrite-opentelemetryinstrumentation-redis-to-orchestrion
Jul 8, 2026
Merged

feat(server-utils): Migrate @opentelemetry/instrumentation-redis to orchestrion#21925
chargome merged 6 commits into
developfrom
charlygomez/js-2416-rewrite-opentelemetryinstrumentation-redis-to-orchestrion

Conversation

@chargome

@chargomechargome commented Jul 2, 2026

Copy link
Copy Markdown
Member

Migrates node-redis from the OTel monkey-patch to orchestrion diagnostics-channel injection. Builds on the ioredis migration (#21849).

  • New RedisChannel subscriber in @sentry/server-utils produces the same db spans as the OTel RedisInstrumentation: single commands, connect, and multi/pipeline batches.
  • Batch spans mirror the native node-redis:batch shape.
  • node-redis ≥5.12 keeps using its own node-redis:* diagnostics_channel (unchanged).
  • When diagnostics-channel injection is opted in, the OTel RedisInstrumentation monkey-patch is fully gated off; the composite Redis integration stays for the native-channel subscriber/

Note: When we eventually delete the OTel Redis integration, we need to move the native diagnostics-channel subscriber (subscribeRedisDiagnosticChannels, for node-redis ≥5.12 / ioredis ≥5.11) into the orchestrion-owned side so it keeps running, then collapse everything into one default Redis integration.

closes#20765

@linear-code

Copy link
Copy Markdown

JS-2416

@chargomechargome self-assigned this Jul 2, 2026
@github-actions

github-actionsBot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize% ChangeChange
@sentry/browser27.59 kB--
@sentry/browser - with treeshaking flags26.03 kB--
@sentry/browser (incl. Tracing)46.27 kB--
@sentry/browser (incl. Tracing + Span Streaming)48.03 kB--
@sentry/browser (incl. Tracing, Profiling)51.03 kB--
@sentry/browser (incl. Tracing, Replay)85.56 kB--
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags75.17 kB--
@sentry/browser (incl. Tracing, Replay with Canvas)90.26 kB--
@sentry/browser (incl. Tracing, Replay, Feedback)102.91 kB--
@sentry/browser (incl. Feedback)44.76 kB--
@sentry/browser (incl. sendFeedback)32.38 kB--
@sentry/browser (incl. FeedbackAsync)37.51 kB--
@sentry/browser (incl. Metrics)28.67 kB--
@sentry/browser (incl. Logs)28.91 kB--
@sentry/browser (incl. Metrics & Logs)29.59 kB--
@sentry/react29.38 kB--
@sentry/react (incl. Tracing)48.53 kB--
@sentry/vue33.03 kB--
@sentry/vue (incl. Tracing)48.16 kB--
@sentry/svelte27.61 kB--
CDN Bundle30 kB--
CDN Bundle (incl. Tracing)48.26 kB--
CDN Bundle (incl. Logs, Metrics)31.57 kB--
CDN Bundle (incl. Tracing, Logs, Metrics)49.57 kB--
CDN Bundle (incl. Replay, Logs, Metrics)70.81 kB--
CDN Bundle (incl. Tracing, Replay)85.73 kB--
CDN Bundle (incl. Tracing, Replay, Logs, Metrics)87.04 kB--
CDN Bundle (incl. Tracing, Replay, Feedback)91.55 kB--
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics)92.83 kB--
CDN Bundle - uncompressed89.35 kB--
CDN Bundle (incl. Tracing) - uncompressed145.99 kB--
CDN Bundle (incl. Logs, Metrics) - uncompressed94.05 kB--
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed149.96 kB--
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed218.75 kB--
CDN Bundle (incl. Tracing, Replay) - uncompressed265.16 kB--
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed269.12 kB--
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed278.86 kB--
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed282.81 kB--
@sentry/nextjs (client)50.94 kB--
@sentry/sveltekit (client)46.68 kB--
@sentry/core/server78.38 kB--
@sentry/core/browser64.74 kB--
@sentry/node-core62.72 kB+0.01%+1 B 🔺
@sentry/node124.6 kB--
@sentry/node (incl. diagnostics channel injection)132.88 kB+0.77%+1.01 kB 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection)69.95 kB--
@sentry/node/light50.72 kB--
@sentry/node - without tracing74.05 kB+0.01%+1 B 🔺
@sentry/aws-serverless85.5 kB+0.01%+1 B 🔺
@sentry/cloudflare (withSentry) - minified181.68 kB--
@sentry/cloudflare (withSentry)449.39 kB--

View base workflow run

Base automatically changed from cg/redisio-orchestrion to developJuly 3, 2026 09:28
@chargome
chargomeforce-pushed the charlygomez/js-2416-rewrite-opentelemetryinstrumentation-redis-to-orchestrion branch 6 times, most recently from 7f8ff61 to d1fc434CompareJuly 6, 2026 13:55
@chargome

Copy link
Copy Markdown
MemberAuthor

bugbot run

Comment threadpackages/server-utils/src/orchestrion/config/redis.ts Outdated
Comment threadpackages/server-utils/src/integrations/tracing-channel/redis.ts Outdated
@chargome
chargomeforce-pushed the charlygomez/js-2416-rewrite-opentelemetryinstrumentation-redis-to-orchestrion branch 2 times, most recently from de98cf9 to e42cb19CompareJuly 6, 2026 15:21
@chargome

Copy link
Copy Markdown
MemberAuthor

bugbot run

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit e42cb19. Configure here.

@chargome
chargome marked this pull request as ready for review July 7, 2026 08:47
@chargome
chargome requested a review from a team as a code ownerJuly 7, 2026 08:47
@chargome
chargome requested review from JPeer264, andreiborza, mydea and nicohrubec and removed request for a teamJuly 7, 2026 08:47
Comment threadpackages/server-utils/src/integrations/tracing-channel/redis.ts Outdated
@chargome
chargomeforce-pushed the charlygomez/js-2416-rewrite-opentelemetryinstrumentation-redis-to-orchestrion branch from 2527f21 to 51aede6CompareJuly 7, 2026 10:07
… orchestrion
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@chargome
chargomeforce-pushed the charlygomez/js-2416-rewrite-opentelemetryinstrumentation-redis-to-orchestrion branch from 51aede6 to d073ef7CompareJuly 7, 2026 12:20

@JPeer264JPeer264 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Comment threadpackages/server-utils/src/integrations/tracing-channel/redis.ts Outdated
chargomeand others added 4 commits July 8, 2026 10:14
…instrumentation-redis-to-orchestrion
Resolve conflict in redis integration: keep this branch's skip-both-OTel-patches
logic (branch adds orchestrion redisConfig for node-redis <5.12.0), adopt develop's
extendIntegration structure where the diagnostics-channel subscription is handled by
the shared server-utils redisChannelIntegration (#21963).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…instrumentation-redis-to-orchestrion
Resolve additive conflict in server-utils/orchestrion/index.ts: keep both this
branch's redisChannelIntegration exports and develop's PostgresJsChannelIntegrationOptions
type export.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@chargome
chargome merged commit 5c349d4 into developJul 8, 2026
586 of 589 checks passed
@chargome
chargome deleted the charlygomez/js-2416-rewrite-opentelemetryinstrumentation-redis-to-orchestrion branch July 8, 2026 10:48
Sign up for freeto 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.

Rewrite @opentelemetry/instrumentation-redis to orchestrion

2 participants

@chargome@JPeer264