In my test Next.js project (create-next-app), I've incorporated Sentry's monitoring tool. However, with each app startup or reload, Sentry sends several POST requests to its server which eventually results in a 429 error.
It's quite frustrating, especially since I'm on the free-plan.
Here are my Sentry configurations for both client and server:
import * as Sentry from '@sentry/nextjs'
Sentry.init({
dsn: process.env.sentryDsn,
enabled: true,
environment: process.env.NODE_ENV,
beforeSend(event) {
return event
},
tracesSampleRate: 1.0,
})
And this is the default setup in my index.js file:
import Head from 'next/head'
import Image from 'next/image'
import styles from '../styles/Home.module.css'
export default function Home() {
return (
...JSX
)
}
Interestingly, even without importing Sentry into my component, it still triggers these unwanted requests.
https://i.sstatic.net/7xAEh.png
The target route for the requests is:
Request URL: https://xxxxxxxx.ingest.sentry.io/api/xxxxxxx/envelope/?sentry_key=<my-sentry-key>&sentry_version=7&sentry_client=sentry.javascript.nextjs%2F7.7.0
Request Method: POST
Is there any way for me to stop these automatic requests from being sent?