Closed Pikachews closed 2 months ago
Hey @Pikachews thanks for writing in!
But this seems to be inaccurate, as when both the
/pages
and/src
directory are present, the instrumentation file appears to be read from the project root, instead of from/src
.
Hmm that's interesting. Coincidentally we've been looking at the placement of instrumentation.ts
very recently. I'm therefore gonna tag @onurtemizkan - could you take a look at this?
Thanks for reporting @Pikachews, #629 will fix this.
Environment
What version are you running? Etc.
@sentry/wizard@3.25.2
Steps to Reproduce
/pages
and/src/pages
directoryExpected Result
The
instrumentation.ts
file should be created at/instrumentation.ts
(in the project root) and be recognized by the Next.js framework.Actual Result
The
instrumentation.ts
file was created at/src/instrumentation.ts
and is not recognized by the Next.js framework. Manually moving the file allows Next.js to properly recognize the file.According to the Next.js docs:
But this seems to be inaccurate, as when both the
/pages
and/src
directory are present, the instrumentation file appears to be read from the project root, instead of from/src
.