Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next js production backend source maps #224

Merged
merged 2 commits into from
Jul 29, 2024

Conversation

unflxw
Copy link
Contributor

@unflxw unflxw commented Jul 26, 2024

Enable source mapping in Next.js

For source-mapped backtraces to be emitted for Next.js backend errors
when Next.js is running in production mode, the webpack configuration
needs to be tweaked in order to emit backtraces, and the
--enable-source-maps flag needs to be passed to the Node.js runtime
when starting the Next.js application, using the NODE_OPTIONS
environment variable.

Do not lock AppSignal version for Next.js

The Next.js test setups, due to a Webpack limitation, do not use the
source code of the integration at nodejs/integration, instead
installing it from the NPM servers.

Due to this, it makes sense for its bound to be set to latest, to
prevent accidentally testing against a very old version of the
integration.

@unflxw unflxw requested a review from tombruijn July 26, 2024 11:54
@unflxw unflxw self-assigned this Jul 26, 2024
@unflxw unflxw added the chore label Jul 26, 2024
Copy link
Member

@tombruijn tombruijn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rebase on main to include the fix in #223 so that the build is green again.

Are we also adding this to the docs?

For source-mapped backtraces to be emitted for Next.js backend errors
when Next.js is running in production mode, the webpack configuration
needs to be tweaked in order to emit backtraces, and the
`--enable-source-maps` flag needs to be passed to the Node.js runtime
when starting the Next.js application, using the `NODE_OPTIONS`
environment variable.
The Next.js test setups, due to a Webpack limitation, do not use the
source code of the integration at `nodejs/integration`, instead
installing it from the NPM servers.

Due to this, it makes sense for its bound to be set to `latest`, to
prevent accidentally testing against a very old version of the
integration.
@unflxw unflxw force-pushed the next-js-production-backend-source-maps branch from 91ba285 to 3bf8daa Compare July 26, 2024 13:31
@unflxw
Copy link
Contributor Author

unflxw commented Jul 26, 2024

@tombruijn Done! Yes, also adding this to the docs.

@backlog-helper
Copy link


This is a message from the daily scheduled checks.

New issue guide | Backlog management | Rules | Feedback

@unflxw unflxw merged commit 64bcf6f into main Jul 29, 2024
1 check passed
@unflxw unflxw deleted the next-js-production-backend-source-maps branch July 29, 2024 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants