1.1.0 • Published 7 months ago

@figedi/sentry-fastify v1.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
7 months ago

@figedi/sentry-fastify

A fastify compatible request-/tracing-middleware. Mainly ported from the official @sentry/node package

Usage

To add tracing, first make sure you have initialized sentry correctly according to their docs, then during fastify-server initialization, add the following snippets:

if (process.env.SENTRY_DSN) {
    server.register(require('@figedi/sentry-fastify').sentryTracingPlugin);
}
server.setErrorHandler(
    combineErrorHandlers(
        [
            process.env.SENTRY_DSN ? require('./lib/sentry').errorHandler({ shouldHandleError: () => true }) : undefined,
            // your other error handlers here
        ].filter(Boolean),
    ),
);
1.1.0

7 months ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

0.0.2

3 years ago