Reduce sampling rate for Sentry traces (#2245)

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.
This commit is contained in:
Stan Girard 2024-02-22 14:48:45 -08:00 committed by GitHub
parent 5f862e7c31
commit 44312dc617
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

@ -44,6 +44,7 @@ if sentry_dsn:
dsn=sentry_dsn,
sample_rate=0.1,
enable_tracing=True,
traces_sample_rate=0.1,
integrations=[
StarletteIntegration(transaction_style="endpoint"),
FastApiIntegration(transaction_style="endpoint"),

View File

@ -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,
@ -35,4 +36,4 @@ if (SENTRY_DSN) {
});
} else {
console.log("Sentry is not initialized as SENTRY_DSN is not set");
}
}