Description
- Review the documentation: https://docs.sentry.io/
- Search for existing issues: https://github.com/getsentry/sentry-javascript/issues
- Use the latest release: https://github.com/getsentry/sentry-javascript/releases
- Provide a link to the affected event from your Sentry account
Package + Version
-
@sentry/browser
-
@sentry/node
-
raven-js
-
raven-node
(raven for node) - other: nextjs
Version:
6.7.1
Description
When I scafold a nextjs app (using nx workspaces, but probably unrelated) and add sentry to it, the frontend works just fine, but running next dev
results in pages/api/* routes not logging to sentry. I do use the withSentry wrapper around my handlers, but it appears that Sentry.init never gets called despite sentry.server.config.js being configured. Calling it manually right outside the handler fixes it, so it's definitely got to do with the cli not calling init. I am guessing the init gets called during webpack builds which is configured to only run in production (I dont want to upload source maps for local dev).