Skip to content

Commit

Permalink
[skip ci] adjust sample rate for env
Browse files Browse the repository at this point in the history
  • Loading branch information
tom2drum committed Nov 23, 2023
1 parent 922f55b commit 3289673
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
1 change: 0 additions & 1 deletion deploy/values/review/values.yaml.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ frontend:
OTEL_SDK_ENABLED: true
OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger-collector.jaeger.svc.cluster.local:4318
NEXT_OTEL_VERBOSE: 1
NEXT_PUBLIC_SENTRY_ENABLE_TRACING: true
envFromSecret:
NEXT_PUBLIC_SENTRY_DSN: ref+vault://deployment-values/blockscout/dev/review?token_env=VAULT_TOKEN&address=https://vault.k8s.blockscout.com#/NEXT_PUBLIC_SENTRY_DSN
SENTRY_CSP_REPORT_URI: ref+vault://deployment-values/blockscout/dev/review?token_env=VAULT_TOKEN&address=https://vault.k8s.blockscout.com#/SENTRY_CSP_REPORT_URI
Expand Down
13 changes: 7 additions & 6 deletions lib/sentry/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ export const config: Sentry.BrowserOptions | undefined = (() => {
}

const tracesSampleRate: number | undefined = (() => {
if (feature.environment === 'staging' || feature.environment === 'development') {
return 1;
}

if (feature.environment === 'production') {
return 0.2;
switch (feature.environment) {
case 'development':
return 1;
case 'staging':
return 0.75;
case 'production':
return 0.2;
}
})();

Expand Down

0 comments on commit 3289673

Please sign in to comment.