Skip to content

Commit

Permalink
Added new environement variable to setup a trace sample rate to limit…
Browse files Browse the repository at this point in the history
… the number of calls to sentry (#601)
  • Loading branch information
Doniaab authored Jan 23, 2024
1 parent 2540c51 commit 83eab83
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .env.ci
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,7 @@ CRISP_IDENTIFIER='cat'
CRISP_KEY='mouse'

# Api address min score
MIN_SCORE_ADDRESS='0.55'
MIN_SCORE_ADDRESS='0.55'

# Sentry
SENTRY_TRACE_SAMPLE_RATE='0.05'
3 changes: 3 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,6 @@ FEATURE_CHECK_MULTIPLE_FILES=false

# Api address min score
MIN_SCORE_ADDRESS='0.55'

# Sentry
SENTRY_TRACE_SAMPLE_RATE='0.05'
1 change: 1 addition & 0 deletions utils/sentry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const initCaptureConsole = (): void => {
integrations: [
new sentryIntegrations.CaptureConsole({ levels: logLevel }),
],
tracesSampleRate: parseFloat(process.env.SENTRY_TRACE_SAMPLE_RATE),
});
};

Expand Down

0 comments on commit 83eab83

Please sign in to comment.