immobiliare / fastify-sentry

🚧 Sentry errors handler for fastify that just works! Install, add your DSN and you're good to go!
MIT License
88 stars 12 forks source link

Usage of fastify + sentry inside a electron process. #713

Open arthurfiorette opened 7 months ago

arthurfiorette commented 7 months ago

We're doing some hacky stuff to make Fastify work inside the main electron process. Somehow its hitting this line every time inside the electron process.

https://github.com/immobiliare/fastify-sentry/blob/598a4dc1332a7a2dc99a347d8c9e72a3b29718b2/lib/request.js#L145

When the Fastify server runs directly with node, it works as normal.

I'm thinking this is because this project uses direct imports of @sentry/node and in our case we might need to use @sentry/electron. Is there a way to change it or could you guys give us some help?

dnlup commented 6 months ago

Hi @arthurfiorette , I am not familiar with Sentry SDK in electron environments. Using another @sentry/* package would require the use of dynamic imports in the plugin code I think, not sure if that's enough though. Unfortunately I don't have the time to test this right now.