Skip to content

fix(redis): bring span attributes into alignment with conventions#21255

Merged
isaacs merged 1 commit into
developfrom
isaacs/js-2636-review-redis-diagnostics_channel-span-attribute-names
Jun 11, 2026
Merged

fix(redis): bring span attributes into alignment with conventions#21255
isaacs merged 1 commit into
developfrom
isaacs/js-2636-review-redis-diagnostics_channel-span-attribute-names

Conversation

@isaacs

@isaacs isaacs commented May 30, 2026

Copy link
Copy Markdown
Member

Bring the span attributes emitted by the Redis and IORedis diagnostics_channel instrumentations into alignment with OTel and Sentry conventions.

The cache keys are left as-is, because they already align with Sentry's cache conventions, which differ from the DB conventions deliberately.

So:

db.system -> db.system.name
OTel deprecated db.system; Sentry's own span processing (captureSpan.ts) reads db.system.name first; matches postgresjs

db.statement -> db.query.text
OTel deprecated db.statement; matches postgresjs

net.peer.port -> server.port
net.peer.name -> server.address
OTel deprecated net.peer.*; Sentry DB convention uses server.address

db.redis.batch_size -> db.operation.batch.size
OTel's stable batch-size key, proposed addition to sentry conventions: getsentry/sentry-conventions#407

fix: JS-2636
fix: #21227

@isaacs isaacs requested a review from JPeer264 May 30, 2026 01:49
@isaacs isaacs requested a review from a team as a code owner May 30, 2026 01:49
@isaacs isaacs requested review from andreiborza and removed request for a team May 30, 2026 01:49
@linear-code

linear-code Bot commented May 30, 2026

Copy link
Copy Markdown

JS-2636

@isaacs

isaacs commented May 30, 2026

Copy link
Copy Markdown
Member Author

Note: the target of this PR is the isaacs/sentry-internal-server-utils branch, because it didn't make much sense to land one of these and immediately conflict the other.

This should land after #21200.

@cursor cursor Bot 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.

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 08abb36. Configure here.

Comment thread packages/server-utils/src/redis/redis-dc-subscriber.ts
@github-actions

github-actions Bot commented May 30, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 27.21 kB - -
@sentry/browser - with treeshaking flags 25.65 kB - -
@sentry/browser (incl. Tracing) 45.51 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 47.73 kB - -
@sentry/browser (incl. Tracing, Profiling) 50.29 kB - -
@sentry/browser (incl. Tracing, Replay) 84.71 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 74.34 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 89.41 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 102.11 kB - -
@sentry/browser (incl. Feedback) 44.37 kB - -
@sentry/browser (incl. sendFeedback) 32.03 kB - -
@sentry/browser (incl. FeedbackAsync) 37.12 kB - -
@sentry/browser (incl. Metrics) 28.28 kB - -
@sentry/browser (incl. Logs) 28.53 kB - -
@sentry/browser (incl. Metrics & Logs) 29.22 kB - -
@sentry/react 29.02 kB - -
@sentry/react (incl. Tracing) 47.78 kB - -
@sentry/vue 32.22 kB - -
@sentry/vue (incl. Tracing) 47.4 kB - -
@sentry/svelte 27.23 kB - -
CDN Bundle 29.58 kB - -
CDN Bundle (incl. Tracing) 47.95 kB - -
CDN Bundle (incl. Logs, Metrics) 31.09 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 49.2 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 70.37 kB - -
CDN Bundle (incl. Tracing, Replay) 85.34 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 86.52 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 91.16 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.34 kB - -
CDN Bundle - uncompressed 87.78 kB - -
CDN Bundle (incl. Tracing) - uncompressed 144.98 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 92.27 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 148.74 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 217.08 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 263.85 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 267.59 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 277.55 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 281.28 kB - -
@sentry/nextjs (client) 50.26 kB - -
@sentry/sveltekit (client) 45.92 kB - -
@sentry/core/server 75.96 kB - -
@sentry/core/browser 63.1 kB - -
@sentry/node-core 61.72 kB - -
@sentry/node 130.44 kB +0.02% +20 B 🔺
@sentry/node - without tracing 74.11 kB +0.01% +1 B 🔺
@sentry/aws-serverless 86.29 kB - -
@sentry/cloudflare (withSentry) - minified 173.68 kB - -
@sentry/cloudflare (withSentry) 433.79 kB - -

View base workflow run

@isaacs isaacs force-pushed the isaacs/sentry-internal-server-utils branch from 1e2b91f to 39f2781 Compare May 30, 2026 02:46
@isaacs isaacs force-pushed the isaacs/js-2636-review-redis-diagnostics_channel-span-attribute-names branch from 08abb36 to 0d82ae0 Compare May 30, 2026 04:45
Comment thread packages/server-utils/src/redis/redis-dc-subscriber.ts
@isaacs isaacs force-pushed the isaacs/js-2636-review-redis-diagnostics_channel-span-attribute-names branch from 0d82ae0 to 8ae827c Compare May 31, 2026 02:18
@cleptric

cleptric commented Jun 1, 2026

Copy link
Copy Markdown
Member

We need to make sure that all removed attributes are defined in sentry conventions and that we properly set up deprecations with them, so defined alerts, dashboards and saved queries to not break.
It's a good exercise to check current usage in Hex as well.

Base automatically changed from isaacs/sentry-internal-server-utils to develop June 1, 2026 17:52
@isaacs isaacs force-pushed the isaacs/js-2636-review-redis-diagnostics_channel-span-attribute-names branch from 8ae827c to cfaa2fd Compare June 1, 2026 17:53
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

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

@JPeer264

JPeer264 commented Jun 3, 2026

Copy link
Copy Markdown
Member

I'm gonna wait for the Sentry convention PRs before I review

@andreiborza

Copy link
Copy Markdown
Member

I'm gonna wait for the Sentry convention PRs before I review

Same

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

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

Bring the span attributes emitted by the Redis and IORedis
diagnostics_channel instrumentations into alignment with OTel and Sentry
conventions.

The cache keys are left as-is, because they already align with Sentry's
cache conventions, which differ from the DB conventions deliberately.

So:

db.system -> db.system.name
OTel deprecated db.system; Sentry's own span processing (captureSpan.ts)
reads db.system.name first; matches postgresjs

db.statement -> db.query.text
OTel deprecated db.statement; matches postgresjs

net.peer.port -> server.port
net.peer.name -> server.address
OTel deprecated net.peer.*; Sentry DB convention uses server.address

db.redis.batch_size -> db.operation.batch.size
OTel's stable batch-size key, proposed addition to sentry conventions:
getsentry/sentry-conventions#407

fix: JS-2636
fix: #21227
@isaacs isaacs force-pushed the isaacs/js-2636-review-redis-diagnostics_channel-span-attribute-names branch from cfaa2fd to b68191e Compare June 8, 2026 14:45
@isaacs

isaacs commented Jun 8, 2026

Copy link
Copy Markdown
Member Author

@JPeer264 @andreiborza Conventions landed, PTAL :)

@andreiborza andreiborza 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

@isaacs isaacs merged commit 55455f2 into develop Jun 11, 2026
344 of 348 checks passed
@isaacs isaacs deleted the isaacs/js-2636-review-redis-diagnostics_channel-span-attribute-names branch June 11, 2026 16:31
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.

Review redis diagnostics_channel span attribute names

4 participants