-
Notifications
You must be signed in to change notification settings - Fork 13
Closed as not planned
Description
This looks like a great wrapper for Sentry + Fastify. I'd love to use it in my project.
I don't know if I'm missing an important step in the instructions or something, but I cannot get this to work at all:
import fastifySentry from '@immobiliarelabs/fastify-sentry'
await fastify.register(fastifySentry, {
dsn: process.env.SENTRY_DSN,
debug: true,
environment: process.env.SERVER_ENV,
tracesSampleRate: 1.0,
release: '1.0.0',
})
fastify.route({
method: 'GET',
url: '/test',
handler: async (request, reply) => {
throw new Error('test1234')
},
})
I have the following issues:
- The error is never captured in my Sentry UI. The call to
captureExceptioninbase.jsis firing, but nothing is showing up in Sentry. - Calling
fastify.Sentry.captureMessage()doesn't work either - Enabling tracing with
tracesSampleRate: 1.0does not work becauseif (hasTracingEnabled()) {inrequest.jsevaluates to false.
I've ensured my SENTRY_DSN is correct, as it works when I use the Sentry Node SDK, and double checked your examples and I don't think I'm missing anything.
Any ideas would be appreciated!
ctkc
Metadata
Metadata
Assignees
Labels
No labels