Skip to content

feat(node)!: Drop support for Fastify <3.21.0 - #22752

Merged
andreiborza merged 3 commits into
developfrom
ab/remove-fastify-v3
Jul 28, 2026
Merged

feat(node)!: Drop support for Fastify <3.21.0#22752
andreiborza merged 3 commits into
developfrom
ab/remove-fastify-v3

Conversation

@andreiborza

Copy link
Copy Markdown
Member

What

Drops support for Fastify <3.21.0 by removing FastifyInstrumentationV3 (and instrumentFastifyV3). The node fastifyIntegration becomes a thin pass-through to the channel-based integration in @sentry/server-utils.

Why

The channel-based fastifyIntegration (default since #22501) covers Fastify >=3.21.0 <6. The v3 OpenTelemetry instrumentation only existed to fill the >=3.0.0 <3.21.0 gap, and it was the last remaining import-in-the-middle module-patcher in @sentry/node. Dropping the old Fastify range lets us remove it.

Ref: #22346

Removes `FastifyInstrumentationV3` (and `instrumentFastifyV3`), the OpenTelemetry
instrumentation that covered the early Fastify v3 range `>=3.0.0 <3.21.0`. The
channel-based `fastifyIntegration` from `@sentry/server-utils` covers Fastify
`>=3.21.0 <6`, so the node wrapper is reduced to a pass-through.

Ref: #22346

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@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 b2855dc. Configure here.

Comment thread packages/node/src/integrations/tracing/fastify/index.ts
@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 29.85 kB - -
@sentry/browser - with treeshaking flags 28.06 kB - -
@sentry/browser (incl. Tracing) 47.42 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 47.43 kB - -
@sentry/browser (incl. Tracing, Profiling) 52.16 kB - -
@sentry/browser (incl. Tracing, Replay) 86.75 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 76.16 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 91.49 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 104.12 kB - -
@sentry/browser (incl. Feedback) 47.17 kB - -
@sentry/browser (incl. sendFeedback) 34.69 kB - -
@sentry/browser (incl. FeedbackAsync) 39.78 kB - -
@sentry/browser (incl. Metrics) 30.92 kB - -
@sentry/browser (incl. Logs) 31.15 kB - -
@sentry/browser (incl. Metrics & Logs) 31.83 kB - -
@sentry/react 31.64 kB - -
@sentry/react (incl. Tracing) 49.64 kB - -
@sentry/vue 34.77 kB - -
@sentry/vue (incl. Tracing) 49.38 kB - -
@sentry/svelte 29.88 kB - -
CDN Bundle 31.89 kB - -
CDN Bundle (incl. Tracing) 47.77 kB - -
CDN Bundle (incl. Logs, Metrics) 33.44 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 49.15 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 72.8 kB - -
CDN Bundle (incl. Tracing, Replay) 85.41 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 86.69 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 91.18 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.48 kB - -
CDN Bundle - uncompressed 95.14 kB - -
CDN Bundle (incl. Tracing) - uncompressed 143.28 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 99.85 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 147.26 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 224.61 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 262.54 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 266.5 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 276.24 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 280.2 kB - -
@sentry/nextjs (client) 52.23 kB - -
@sentry/sveltekit (client) 47.84 kB - -
@sentry/core/server 79.73 kB - -
@sentry/core/browser 51.61 kB - -
@sentry/node 122.35 kB -2.45% -3.06 kB 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 166 B - -
@sentry/node - without tracing 85.76 kB - -
@sentry/aws-serverless 93.78 kB - -
@sentry/cloudflare (withSentry) - minified 197.26 kB - -
@sentry/cloudflare (withSentry) 485.29 kB - -

View base workflow run

The channel-based fastify integration only covers `>=3.21.0 <6`, so the
`node-fastify-3` app's `fastify@~3.20.0` variant no longer has instrumentation
and its span assertions would fail. The default `fastify@3.29.5` dependency
keeps v3 covered.
@andreiborza
andreiborza requested review from JPeer264 and chargome July 28, 2026 11:20
@andreiborza
andreiborza marked this pull request as ready for review July 28, 2026 11:21
@andreiborza
andreiborza requested a review from a team as a code owner July 28, 2026 11:21
@andreiborza
andreiborza enabled auto-merge (squash) July 28, 2026 11:27
@chargome

Copy link
Copy Markdown
Member

closes #22658 👀

@andreiborza
andreiborza merged commit 9ae72e2 into develop Jul 28, 2026
185 checks passed
@andreiborza
andreiborza deleted the ab/remove-fastify-v3 branch July 28, 2026 12:02
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