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

@isaacsisaacs 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 JPeer264May 30, 2026 01:49
@isaacs
isaacs requested a review from a team as a code ownerMay 30, 2026 01:49
@isaacs
isaacs requested review from andreiborza and removed request for a teamMay 30, 2026 01:49
@linear-code

Copy link
Copy Markdown

JS-2636

@isaacs

Copy link
Copy Markdown
MemberAuthor

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.

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

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 threadpackages/server-utils/src/redis/redis-dc-subscriber.ts
@github-actions

github-actionsBot commented May 30, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize% ChangeChange
@sentry/browser27.21 kB--
@sentry/browser - with treeshaking flags25.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 flags74.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/react29.02 kB--
@sentry/react (incl. Tracing)47.78 kB--
@sentry/vue32.22 kB--
@sentry/vue (incl. Tracing)47.4 kB--
@sentry/svelte27.23 kB--
CDN Bundle29.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 - uncompressed87.78 kB--
CDN Bundle (incl. Tracing) - uncompressed144.98 kB--
CDN Bundle (incl. Logs, Metrics) - uncompressed92.27 kB--
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed148.74 kB--
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed217.08 kB--
CDN Bundle (incl. Tracing, Replay) - uncompressed263.85 kB--
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed267.59 kB--
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed277.55 kB--
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed281.28 kB--
@sentry/nextjs (client)50.26 kB--
@sentry/sveltekit (client)45.92 kB--
@sentry/core/server75.96 kB--
@sentry/core/browser63.1 kB--
@sentry/node-core61.72 kB--
@sentry/node130.44 kB+0.02%+20 B 🔺
@sentry/node - without tracing74.11 kB+0.01%+1 B 🔺
@sentry/aws-serverless86.29 kB--
@sentry/cloudflare (withSentry) - minified173.68 kB--
@sentry/cloudflare (withSentry)433.79 kB--

View base workflow run

@isaacs
isaacsforce-pushed the isaacs/sentry-internal-server-utils branch from 1e2b91f to 39f2781CompareMay 30, 2026 02:46
@isaacs
isaacsforce-pushed the isaacs/js-2636-review-redis-diagnostics_channel-span-attribute-names branch from 08abb36 to 0d82ae0CompareMay 30, 2026 04:45
Comment threadpackages/server-utils/src/redis/redis-dc-subscriber.ts
@isaacs
isaacsforce-pushed the isaacs/js-2636-review-redis-diagnostics_channel-span-attribute-names branch from 0d82ae0 to 8ae827cCompareMay 31, 2026 02:18
@cleptric

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 developJune 1, 2026 17:52
@isaacs
isaacsforce-pushed the isaacs/js-2636-review-redis-diagnostics_channel-span-attribute-names branch from 8ae827c to cfaa2fdCompareJune 1, 2026 17:53
@github-actions

Copy link
Copy Markdown
Contributor

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

@JPeer264

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

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
isaacsforce-pushed the isaacs/js-2636-review-redis-diagnostics_channel-span-attribute-names branch from cfaa2fd to b68191eCompareJune 8, 2026 14:45
@isaacs

Copy link
Copy Markdown
MemberAuthor

@JPeer264@andreiborza Conventions landed, PTAL :)

@andreiborzaandreiborza 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 developJun 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 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.

Review redis diagnostics_channel span attribute names

4 participants

@isaacs@cleptric@JPeer264@andreiborza