You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 1,
// Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false,
replaysOnErrorSampleRate: 1.0,
// This sets the sample rate to be 10%. You may want this to be 100% while
// in development and sample at a lower rate in production
replaysSessionSampleRate: 0.1,
// You can remove this option if you're not planning to use the Sentry Session Replay feature:
integrations: [
new Sentry.Replay({
// Additional Replay configuration goes in here, for example:
maskAllText: true,
blockAllMedia: true,
}),
],
});
Steps to Reproduce
Create a next project using yarn create next-app and the following responses:
√ Would you like to use TypeScript? ... No / Yes
√ Would you like to use ESLint? ... No / Yes
√ Would you like to use Tailwind CSS? ... No / Yes
√ Would you like to use `src/` directory? ... No / Yes
√ Would you like to use App Router? (recommended) ... No / Yes
√ Would you like to customize the default import alias? ... No / Yes
Add sentry using npx @sentry/wizard@latest -i nextjs
Add http-server using yarn add http-server
In pages/index.js, remove everything related to 'next/image'
Add the following to package.json under scripts: "export": "next build && next export",
Run yarn dev, navigate to /sentry-example-page, click the Throw error! button, and it will show up in sentry
Next run yarn export and then http-server ./out. Navigate to the same page and click the Throw error! button
Expected Result
I am expecting that sentry works when running nextjs as a static site. These issues seem to imply that it is possible:
However I could be wrong, and couldn't specifically verify in the documentation if sentry should work in this use case.
Actual Result
No result shows up in sentry. Instead, the static site is trying to make a call to the http-server, which unsurprisingly fails. I would have expected this to be handled on the client.
The text was updated successfully, but these errors were encountered:
Hi, when doing next export the tunnelRoute option will not work, as you don't have a server that is running. You should just be able to remove that option.
For any future googlers, that's configured in next.config.js. Make sure you have any ad blockers disabled while testing, and if you don't want to have these reports potentially blocked by ad blockers, review this section:
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nextjs
SDK Version
7.64.0
Framework Version
7.64.0
Link to Sentry event
No response
SDK Setup
import * as Sentry from "@sentry/nextjs";
Sentry.init({
dsn: "mydsn",
// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 1,
// Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false,
replaysOnErrorSampleRate: 1.0,
// This sets the sample rate to be 10%. You may want this to be 100% while
// in development and sample at a lower rate in production
replaysSessionSampleRate: 0.1,
// You can remove this option if you're not planning to use the Sentry Session Replay feature:
integrations: [
new Sentry.Replay({
// Additional Replay configuration goes in here, for example:
maskAllText: true,
blockAllMedia: true,
}),
],
});
Steps to Reproduce
yarn create next-app
and the following responses:npx @sentry/wizard@latest -i nextjs
yarn add http-server
"export": "next build && next export",
yarn dev
, navigate to /sentry-example-page, click the Throw error! button, and it will show up in sentryyarn export
and thenhttp-server ./out
. Navigate to the same page and click the Throw error! buttonExpected Result
I am expecting that sentry works when running nextjs as a static site. These issues seem to imply that it is possible:
#6088
#6255
#3761
However I could be wrong, and couldn't specifically verify in the documentation if sentry should work in this use case.
Actual Result
No result shows up in sentry. Instead, the static site is trying to make a call to the http-server, which unsurprisingly fails. I would have expected this to be handled on the client.
The text was updated successfully, but these errors were encountered: