getsentry/examples

NextJS Example does not include API pages

epleaner opened this issue · 3 comments

Environment

Looking at the main branch, there are no API pages included. They seem to have been deleted.

It's a little unclear but look at the tunnelRoute parameter here

That enables the a built in tunnel route (part of the nextjs sentry sdk) so a custom route is no longer required.

Just make sure to reference the same route in the tunnel parameter in your client config.

tunnelRoute doesn't work for me because Next's rewrites have a very limited body size and requests a bit bigger than others don't go through and stay pending.

edit:
tunnelRoute: '/api/monit works
tunnelRoute: '/monit' doesn't works

Closing this issue for repo clean up.

To ensure your nextjs Sentry config is up to date, we recommend running the Sentry wizard on your project. npx @sentry/wizard@latest -i nextjs. This will ensure you have the needed config.

You can also see the official nextjs sentry example and our docs to see more configuration examples.