1.1.0 • Published 2 years ago

@figedi/sentry-fastify v1.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years 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

2 years ago

1.0.6

3 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

0.0.2

4 years ago