Skip to content

Commit

Permalink
Reduce sampling rate for Sentry traces (#2245)
Browse files Browse the repository at this point in the history
This pull request reduces the sampling rate for Sentry traces to 0.1.
This change ensures that only a small percentage of traces are captured,
which helps to reduce the impact on performance and storage.
  • Loading branch information
StanGirard committed Feb 22, 2024
1 parent 5f862e7 commit 44312dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
dsn=sentry_dsn,
sample_rate=0.1,
enable_tracing=True,
traces_sample_rate=0.1,
integrations=[
StarletteIntegration(transaction_style="endpoint"),
FastApiIntegration(transaction_style="endpoint"),
Expand Down
3 changes: 2 additions & 1 deletion frontend/sentry.client.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ if (SENTRY_DSN) {

// Adjust this value in production, or use tracesSampler for greater control
sampleRate: 0.1,
tracesSampleRate: 0.1,

// Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false,
Expand All @@ -35,4 +36,4 @@ if (SENTRY_DSN) {
});
} else {
console.log("Sentry is not initialized as SENTRY_DSN is not set");
}
}

0 comments on commit 44312dc

Please sign in to comment.