Replies: 2 comments
-
Sentry Next.js SDK maintainer here. We took the current version of the Next.js docs too literal and didn't auto instrument https://nextjs.org/docs/app/building-your-application/routing/route-handlers#convention Additionally, we should probably also change the docs stating that |
Beta Was this translation helpful? Give feedback.
-
Sometimes .jsx|tsx makes sense for an API route. It's not uncommon that an email has to be sent containing markup constructed from react components when the route is invoked. |
Beta Was this translation helpful? Give feedback.
-
Goals
Non-Goals
Background
I was having an issue with Sentry not autoinstrumenting API endpoints. Because this was a recent feature release from Sentry (to enable it with the App Router), I wasn't sure where the issue was originating (Sentry's new work, my migration to use the updated Sentry, or something else).
Next.js made no complaint about me using .tsx file extension for API routes. Sentry wouldn't autoinstrument them though.
Proposal
A warning at build time if API routes are using the wrong file extension.
Beta Was this translation helpful? Give feedback.
All reactions