Skip to content

feat(node)!: Use db.query and db span ops for Redis - #22690

Draft
msonnb wants to merge 1 commit into
developfrom
ms/js-3105-redis-db-ops
Draft

feat(node)!: Use db.query and db span ops for Redis#22690
msonnb wants to merge 1 commit into
developfrom
ms/js-3105-redis-db-ops

Conversation

@msonnb

@msonnb msonnb commented Jul 27, 2026

Copy link
Copy Markdown
Member

Commands and batches use db.query instead of db.redis; connect spans use db instead of db.redis.connect. The datastore is already identified by db.system.name=redis, so the library-specific op leaf was redundant.

Command spans in the DC subscriber now also set db.operation.name — the command was only in db.query.text before.

Two command paths in tracing-channel/redis.ts were already emitting a bare db; those become db.query too, since they carry a statement. Redis used as a cache keeps its cache.* ops (that classification happens in the response hook and is unaffected).

Part of #22446

@linear-code

linear-code Bot commented Jul 27, 2026

Copy link
Copy Markdown

JS-3105

@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 28.02 kB - -
@sentry/browser - with treeshaking flags 26.46 kB - -
@sentry/browser (incl. Tracing) 46.54 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 47.46 kB - -
@sentry/browser (incl. Tracing, Profiling) 51.3 kB - -
@sentry/browser (incl. Tracing, Replay) 85.87 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 75.51 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 90.58 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 103.22 kB - -
@sentry/browser (incl. Feedback) 45.2 kB - -
@sentry/browser (incl. sendFeedback) 32.82 kB - -
@sentry/browser (incl. FeedbackAsync) 37.86 kB - -
@sentry/browser (incl. Metrics) 29.12 kB - -
@sentry/browser (incl. Logs) 29.34 kB - -
@sentry/browser (incl. Metrics & Logs) 30.05 kB - -
@sentry/react 29.8 kB - -
@sentry/react (incl. Tracing) 48.85 kB - -
@sentry/vue 33.97 kB - -
@sentry/vue (incl. Tracing) 48.53 kB - -
@sentry/svelte 28.04 kB - -
CDN Bundle 30.32 kB - -
CDN Bundle (incl. Tracing) 47.71 kB - -
CDN Bundle (incl. Logs, Metrics) 31.9 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 49.08 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 71.17 kB - -
CDN Bundle (incl. Tracing, Replay) 85.31 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 86.61 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 91.12 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.39 kB - -
CDN Bundle - uncompressed 90.26 kB - -
CDN Bundle (incl. Tracing) - uncompressed 143.22 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 94.97 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 147.2 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 219.73 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 262.47 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 266.44 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 276.18 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 280.13 kB - -
@sentry/nextjs (client) 51.41 kB - -
@sentry/sveltekit (client) 47.01 kB - -
@sentry/core/server 79.57 kB - -
@sentry/core/browser 51.54 kB - -
@sentry/node 112.49 kB +0.02% +13 B 🔺
@sentry/node (incl. diagnostics channel injection) 156.63 kB -0.01% -6 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 166 B - -
@sentry/node - without tracing 62.01 kB - -
@sentry/aws-serverless 72.29 kB -0.01% -1 B 🔽
@sentry/cloudflare (withSentry) - minified 195.94 kB - -
@sentry/cloudflare (withSentry) 482.5 kB - -

View base workflow run

@msonnb
msonnb changed the base branch from ms/js-3105-cache-ops to develop July 27, 2026 13:07
@msonnb
msonnb force-pushed the ms/js-3105-redis-db-ops branch from 0f6d8d0 to 255327a Compare July 27, 2026 13:52
The datastore belongs in `db.system.name`, not the op. Commands and
batches use `db.query`, connects use `db`. Command spans now also set
`db.operation.name`. Cache-classified spans keep their `cache.*` ops.

Ref: JS-3105

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@msonnb
msonnb force-pushed the ms/js-3105-redis-db-ops branch from 255327a to abf5234 Compare July 27, 2026 14:59
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