Skip to content

ref(node): Use @sentry/conventions and vendor remaining semantic conventions#21893

Merged
andreiborza merged 3 commits into
developfrom
ab/node-sentry-conventions
Jul 1, 2026
Merged

ref(node): Use @sentry/conventions and vendor remaining semantic conventions#21893
andreiborza merged 3 commits into
developfrom
ab/node-sentry-conventions

Conversation

@andreiborza

Copy link
Copy Markdown
Member

Source span attribute keys in @sentry/node from @sentry/conventions/attributes instead of @opentelemetry/semantic-conventions and the locally vendored ./semconv constants, for every attribute that has a @sentry/conventions equivalent. The package source no longer imports @opentelemetry/semantic-conventions, and the dependency is dropped from package.json.

This revives and rebases the closed #21635 onto current develop, mirroring the merged ref(aws-serverless): Use @sentry/conventions (#21597) and the other conventions migrations.

No functional change: all string values are identical.

Details

  • Migrated to @sentry/conventions/attributes across connect, koa, hapi, hono, fastify (v3), firebase/firestore, postgresjs, and the vendored redis/ioredis, mongo, mongoose, mysql, mysql2, postgres, knex, kafka, amqplib, and tedious instrumentations.
  • Kept vendored locally (no conventions equivalent): db.response.status_code, db.connection_string, db.mongodb.collection, db.sql.table, kafka/rabbitmq-specific messaging keys, and all *_VALUE_* constants. hapi/vendored/semconv.ts became empty and was deleted.
  • Deprecated conventions keys (db.system, db.name, db.operation, db.statement, http.method, net.peer.*, net.transport) carry a typescript/no-deprecated disable, matching the existing knex/postgres vendored files.

…nventions

Source span attribute keys in `@sentry/node` from `@sentry/conventions/attributes`
instead of `@opentelemetry/semantic-conventions` and the locally vendored `./semconv`
constants, for attributes that have a `@sentry/conventions` equivalent. Keys without an
equivalent and all value constants stay vendored locally. The package source no longer
imports `@opentelemetry/semantic-conventions`, and the dependency is removed.

No functional change: all string values are identical.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@andreiborza andreiborza requested a review from a team as a code owner July 1, 2026 14:39
@andreiborza andreiborza requested review from JPeer264 and mydea and removed request for a team July 1, 2026 14:39
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 27.59 kB - -
@sentry/browser - with treeshaking flags 26.03 kB - -
@sentry/browser (incl. Tracing) 46.05 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 47.79 kB - -
@sentry/browser (incl. Tracing, Profiling) 50.81 kB - -
@sentry/browser (incl. Tracing, Replay) 85.28 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 74.89 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 89.97 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 102.64 kB - -
@sentry/browser (incl. Feedback) 44.77 kB - -
@sentry/browser (incl. sendFeedback) 32.39 kB - -
@sentry/browser (incl. FeedbackAsync) 37.52 kB - -
@sentry/browser (incl. Metrics) 28.67 kB - -
@sentry/browser (incl. Logs) 28.91 kB - -
@sentry/browser (incl. Metrics & Logs) 29.6 kB - -
@sentry/react 29.38 kB - -
@sentry/react (incl. Tracing) 48.35 kB - -
@sentry/vue 32.82 kB - -
@sentry/vue (incl. Tracing) 47.91 kB - -
@sentry/svelte 27.61 kB - -
CDN Bundle 30 kB - -
CDN Bundle (incl. Tracing) 47.98 kB - -
CDN Bundle (incl. Logs, Metrics) 31.57 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 49.32 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 70.77 kB - -
CDN Bundle (incl. Tracing, Replay) 85.48 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 86.76 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 91.29 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.53 kB - -
CDN Bundle - uncompressed 89.35 kB - -
CDN Bundle (incl. Tracing) - uncompressed 145.28 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 94.05 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 149.25 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 218.59 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 264.29 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 268.25 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 277.99 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 281.94 kB - -
@sentry/nextjs (client) 50.73 kB - -
@sentry/sveltekit (client) 46.44 kB - -
@sentry/core/server 77.75 kB - -
@sentry/core/browser 64.06 kB - -
@sentry/node-core 62.37 kB - -
@sentry/node 121.24 kB -0.22% -257 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 69.95 kB - -
@sentry/node/light 50.46 kB -0.01% -1 B 🔽
@sentry/node - without tracing 72.68 kB - -
@sentry/aws-serverless 83.52 kB - -
@sentry/cloudflare (withSentry) - minified 180.62 kB - -
@sentry/cloudflare (withSentry) 446.93 kB - -

View base workflow run

@andreiborza andreiborza requested a review from nicohrubec July 1, 2026 15:07

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

🚀

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

🚀

@andreiborza andreiborza merged commit a8b4dcf into develop Jul 1, 2026
361 of 364 checks passed
@andreiborza andreiborza deleted the ab/node-sentry-conventions branch July 1, 2026 16:26
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.

3 participants