Skip to content

Commit

Permalink
tune sentry collection rates per docs (nodejs#6121)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmuenzenmeyer authored Nov 16, 2023
1 parent 8aace7d commit a88030e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
8 changes: 4 additions & 4 deletions sentry.client.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ init({
enabled: !!VERCEL_ENV,
// Tell Sentry where to send events
dsn: SENTRY_DSN,
// Percentage of events to send to Sentry (all of them) (for performance metrics)
tracesSampleRate: 1,
// Percentage of events to send to Sentry (1% of them) (for performance metrics)
tracesSampleRate: 0.01,
// Percentage of sessions to sample (1%)
replaysSessionSampleRate: 0.01,
// Percentage of errors to sample (all of them)
replaysOnErrorSampleRate: 1.0,
// Percentage of sessionsto sample (10%)
replaysSessionSampleRate: 0.1,
// Support replaying client sessions to capture unhappy paths
integrations: [new Replay()],
// We only want to capture errors from _next folder on production
Expand Down
4 changes: 2 additions & 2 deletions sentry.edge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ init({
enabled: !!VERCEL_ENV,
// Tell Sentry where to send events
dsn: SENTRY_DSN,
// Percentage of events to send to Sentry (all of them) (for performance metrics)
tracesSampleRate: 1,
// Percentage of events to send to Sentry (1% of them) (for performance metrics)
tracesSampleRate: 0.01,
});
5 changes: 3 additions & 2 deletions sentry.server.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ init({
enabled: !!VERCEL_ENV,
// Tell Sentry where to send events
dsn: SENTRY_DSN,
// Percentage of events to send to Sentry (all of them) (for performance metrics)
tracesSampleRate: 1,
// Percentage of events to send to Sentry (1% of them) (for performance metrics)
tracesSampleRate: 0.01,
// Percentage of events to send to Sentry (all of them) (for profiling metrics)
// This number is relative to tracesSampleRate - so all traces get profiled
profilesSampleRate: 1.0,
// Add profiling integration to capture performance metrics
integrations: [new ProfilingIntegration()],
Expand Down

0 comments on commit a88030e

Please sign in to comment.