From 2ad7a3e35fb11cb8d34aa213d008f4145d46ce91 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Mon, 20 Jul 2026 13:06:27 +0200 Subject: [PATCH 1/2] ref: Small fastify cleanup --- .../src/integrations/tracing-channel/fastify/index.ts | 5 +---- .../src/integrations/tracing-channel/fastify/utils.ts | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/server-utils/src/integrations/tracing-channel/fastify/index.ts b/packages/server-utils/src/integrations/tracing-channel/fastify/index.ts index edab7d03804c..4bf64ae93eea 100644 --- a/packages/server-utils/src/integrations/tracing-channel/fastify/index.ts +++ b/packages/server-utils/src/integrations/tracing-channel/fastify/index.ts @@ -1,7 +1,6 @@ import type { IntegrationFn } from '@sentry/core'; import { defineIntegration } from '@sentry/core'; import type { FastifyIntegration, FastifyReply, FastifyRequest } from './types'; - import { instrumentFastify as _instrumentFastify } from './instrumentation'; import { defaultShouldHandleError, INTEGRATION_NAME } from './utils'; import { subscribeToFastifyErrorChannel, handleFastifyError as _handleFastifyError } from './errors'; @@ -76,9 +75,7 @@ const _fastifyIntegration = (({ shouldHandleError }: Partial = {}) => - _fastifyIntegration(options), -); +export const fastifyIntegration = defineIntegration(_fastifyIntegration); /** * @deprecated This export is deprecated and will not longer be exposed in the next major version. diff --git a/packages/server-utils/src/integrations/tracing-channel/fastify/utils.ts b/packages/server-utils/src/integrations/tracing-channel/fastify/utils.ts index 9b34135844df..e560590d9234 100644 --- a/packages/server-utils/src/integrations/tracing-channel/fastify/utils.ts +++ b/packages/server-utils/src/integrations/tracing-channel/fastify/utils.ts @@ -1,6 +1,6 @@ import type { FastifyReply, FastifyRequest } from './types'; -export const INTEGRATION_NAME = 'Fastify'; +export const INTEGRATION_NAME = 'Fastify' as const; /** * Default function to determine if an error should be sent to Sentry From 6fdb8a98b322b4dca5c0a0f430f60ec91dd1709f Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Mon, 20 Jul 2026 13:15:48 +0200 Subject: [PATCH 2/2] fix --- .../src/integrations/tracing-channel/fastify/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server-utils/src/integrations/tracing-channel/fastify/index.ts b/packages/server-utils/src/integrations/tracing-channel/fastify/index.ts index 4bf64ae93eea..c690c4ce7407 100644 --- a/packages/server-utils/src/integrations/tracing-channel/fastify/index.ts +++ b/packages/server-utils/src/integrations/tracing-channel/fastify/index.ts @@ -40,7 +40,7 @@ interface FastifyIntegrationOptions { shouldHandleError: (error: Error, request: FastifyRequest, reply: FastifyReply) => boolean; } -const _fastifyIntegration = (({ shouldHandleError }: Partial) => { +const _fastifyIntegration = (({ shouldHandleError }: Partial = {}) => { let _shouldHandleError: (error: Error, request: FastifyRequest, reply: FastifyReply) => boolean; return {