Skip to content

Commit 2ad7a3e

Browse files
committed
ref: Small fastify cleanup
1 parent ee99468 commit 2ad7a3e

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

packages/server-utils/src/integrations/tracing-channel/fastify/index.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import type { IntegrationFn } from '@sentry/core';
22
import { defineIntegration } from '@sentry/core';
33
import type { FastifyIntegration, FastifyReply, FastifyRequest } from './types';
4-
54
import { instrumentFastify as _instrumentFastify } from './instrumentation';
65
import { defaultShouldHandleError, INTEGRATION_NAME } from './utils';
76
import { subscribeToFastifyErrorChannel, handleFastifyError as _handleFastifyError } from './errors';
@@ -76,9 +75,7 @@ const _fastifyIntegration = (({ shouldHandleError }: Partial<FastifyIntegrationO
7675
* })
7776
* ```
7877
*/
79-
export const fastifyIntegration = defineIntegration((options: Partial<FastifyIntegrationOptions> = {}) =>
80-
_fastifyIntegration(options),
81-
);
78+
export const fastifyIntegration = defineIntegration(_fastifyIntegration);
8279

8380
/**
8481
* @deprecated This export is deprecated and will not longer be exposed in the next major version.

packages/server-utils/src/integrations/tracing-channel/fastify/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { FastifyReply, FastifyRequest } from './types';
22

3-
export const INTEGRATION_NAME = 'Fastify';
3+
export const INTEGRATION_NAME = 'Fastify' as const;
44

55
/**
66
* Default function to determine if an error should be sent to Sentry

0 commit comments

Comments
 (0)