Skip to content

How to decrease event requests to my sentry server in React JS? #6835

Answered by AbhiPrasad
mvahedii asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @mvahedii. You can use tracesSampleRate to control the sampling of your performance events, and sampleRate to control the volume of your error events. See https://docs.sentry.io/platforms/javascript/configuration/sampling/ for more details.

We don't recommend you sample your error events heavily though as it might reduce visibility into low volume errors.

Sentry.init({
  tracesSampleRate: 0.2,
  sampleRate: 0.7,
});

We also send session data to Sentry for our release health product. You can set the autoSessionTracking in your Sentry.init to false to disable this feature.

Sentry.init({
  autoSessionTracking: false // default: true
});

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by AbhiPrasad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants