Skip to content

feat(deno): redis diagnostics channel based integration for deno#21087

Open
isaacs wants to merge 1 commit into
developfrom
isaacs/deno-redis-dc
Open

feat(deno): redis diagnostics channel based integration for deno#21087
isaacs wants to merge 1 commit into
developfrom
isaacs/deno-redis-dc

Conversation

@isaacs
Copy link
Copy Markdown
Member

@isaacs isaacs commented May 20, 2026

Refactor the redis-dc integration logic into core/src/integrations, and create a Deno integration that uses the same patterns.

Instead of the @sentry/opentelemetry/tracing-channel, the Deno integration just adds _sentrySpan onto the data in a RedisTracingChannelFactory which is passed to the core utility.

@isaacs isaacs requested a review from a team as a code owner May 20, 2026 21:20
@isaacs isaacs requested review from andreiborza and mydea and removed request for a team May 20, 2026 21:20
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

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.25 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 47.49 kB - -
@sentry/browser (incl. Tracing, Profiling) 50.23 kB - -
@sentry/browser (incl. Tracing, Replay) 84.86 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 74.36 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 89.57 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 102.18 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.49 kB - -
@sentry/vue 32.19 kB - -
@sentry/vue (incl. Tracing) 47.12 kB - -
@sentry/svelte 27.3 kB - -
CDN Bundle 29.68 kB - -
CDN Bundle (incl. Tracing) 47.78 kB - -
CDN Bundle (incl. Logs, Metrics) 31.17 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 49.03 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 70.48 kB - -
CDN Bundle (incl. Tracing, Replay) 85.28 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 86.43 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 91.15 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.31 kB - -
CDN Bundle - uncompressed 87.69 kB - -
CDN Bundle (incl. Tracing) - uncompressed 144.15 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 92.18 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 147.91 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 216.91 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 262.93 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 266.67 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 276.62 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 280.36 kB - -
@sentry/nextjs (client) 49.98 kB - -
@sentry/sveltekit (client) 45.73 kB - -
@sentry/core/server 77.36 kB +1.24% +942 B 🔺
@sentry/core/browser 63.17 kB - -
@sentry/node-core 62.25 kB - -
@sentry/node 130.91 kB +0.14% +177 B 🔺
@sentry/node - without tracing 74.7 kB -0.01% -1 B 🔽
@sentry/aws-serverless 86.91 kB - -
@sentry/cloudflare (withSentry) - minified 172.42 kB - -
@sentry/cloudflare (withSentry) 430.68 kB - -

View base workflow run

isaacs added a commit that referenced this pull request May 20, 2026
)

Refactor the redis-dc integration logic into core/src/integrations, and
create a Deno integration that uses the same patterns.

Instead of the @sentry/opentelemetry/tracing-channel, the Deno
integration just adds `_sentrySpan` onto the data in a
RedisTracingChannelFactory which is passed to the core utility.

Add deno-redis e2e test.
@isaacs isaacs force-pushed the isaacs/deno-redis-dc branch from f176fd8 to 0fc320c Compare May 20, 2026 22:13
@isaacs isaacs force-pushed the isaacs/deno-redis-dc branch from 1048f32 to 72be1fa Compare May 20, 2026 22:18
Comment thread .github/workflows/build.yml
isaacs added a commit that referenced this pull request May 21, 2026
isaacs added a commit that referenced this pull request May 21, 2026
isaacs added a commit that referenced this pull request May 21, 2026
)

Refactor the redis-dc integration logic into core/src/integrations, and
create a Deno integration that uses the same patterns.

Instead of the @sentry/opentelemetry/tracing-channel, the Deno
integration just adds `_sentrySpan` onto the data in a
RedisTracingChannelFactory which is passed to the core utility.

Add deno-redis e2e test.
@isaacs isaacs force-pushed the isaacs/deno-redis-dc branch from 11525d8 to a8d3cb7 Compare May 21, 2026 17:31
Comment thread packages/deno/src/integrations/redis.ts Outdated
Comment thread packages/core/src/integrations/redis/redis-statement-serializer.ts
Comment thread packages/core/src/integrations/redis/redis-dc-subscriber.ts
Comment thread packages/node/src/integrations/tracing/redis/index.ts
isaacs added a commit that referenced this pull request May 21, 2026
Comment thread packages/node/src/utils/redisCache.ts
Comment thread packages/deno/src/sdk.ts Outdated
isaacs added a commit that referenced this pull request May 21, 2026
isaacs added a commit that referenced this pull request May 21, 2026
@isaacs isaacs force-pushed the isaacs/deno-redis-dc branch from 8226aaf to 5863e6c Compare May 21, 2026 21:54
@isaacs isaacs enabled auto-merge (squash) May 21, 2026 23:10
isaacs added a commit that referenced this pull request May 22, 2026
)

Refactor the redis-dc integration logic into core/src/integrations, and
create a Deno integration that uses the same patterns.

Instead of the @sentry/opentelemetry/tracing-channel, the Deno
integration just adds `_sentrySpan` onto the data in a
RedisTracingChannelFactory which is passed to the core utility.

Add deno-redis e2e test.
@isaacs isaacs force-pushed the isaacs/deno-redis-dc branch from 5863e6c to cd298fa Compare May 22, 2026 17:01
Comment thread packages/core/src/integrations/redis/redis-statement-serializer.ts Outdated
@github-actions
Copy link
Copy Markdown
Contributor

👋 @mydea, @andreiborza — Please review this PR when you get a chance!

isaacs added a commit that referenced this pull request May 25, 2026
)

Refactor the redis-dc integration logic into core/src/integrations, and
create a Deno integration that uses the same patterns.

Instead of the @sentry/opentelemetry/tracing-channel, the Deno
integration just adds `_sentrySpan` onto the data in a
RedisTracingChannelFactory which is passed to the core utility.

Add deno-redis e2e test.
@isaacs isaacs force-pushed the isaacs/deno-redis-dc branch from cd298fa to b4e4854 Compare May 25, 2026 16:06
isaacs added a commit that referenced this pull request May 26, 2026
)

Refactor the redis-dc integration logic into core/src/integrations, and
create a Deno integration that uses the same patterns.

Instead of the @sentry/opentelemetry/tracing-channel, the Deno
integration just adds `_sentrySpan` onto the data in a
RedisTracingChannelFactory which is passed to the core utility.

Add deno-redis e2e test.
@isaacs isaacs force-pushed the isaacs/deno-redis-dc branch from b4e4854 to 9217baa Compare May 26, 2026 16:10
@JPeer264 JPeer264 self-requested a review May 27, 2026 09:52
)

Refactor the redis-dc integration logic into core/src/integrations, and
create a Deno integration that uses the same patterns.

Instead of the @sentry/opentelemetry/tracing-channel, the Deno
integration just adds `_sentrySpan` onto the data in a
RedisTracingChannelFactory which is passed to the core utility.

Add deno-redis e2e test.
@isaacs isaacs force-pushed the isaacs/deno-redis-dc branch from e46685b to 1f6c601 Compare May 27, 2026 18:47
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 1f6c601. Configure here.

},
];

const utf8Decoder = new TextDecoder('utf-8');
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Top-level side effect contradicts sideEffects: false

Medium Severity

const utf8Decoder = new TextDecoder('utf-8') is a top-level constructor call (side effect) in a module reachable from @sentry/core's public entry points (server-exports.tsindex.ts). The @sentry/core package declares "sideEffects": false, so bundlers assume every module is purely declarative and may skip executing top-level code. Every other new TextDecoder() / new TextEncoder() call in @sentry/core is scoped inside a function; this is the only module-scope instance. The decoder should be instantiated inside defaultDbStatementSerializer instead.

Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Reviewed by Cursor Bugbot for commit 1f6c601. 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