Skip to content

fix(security): cap Sentry sampling via env defaults#358

Open
kevinnft wants to merge 1 commit into
Quantarq:mainfrom
kevinnft:fix/sentry-sample-rates
Open

fix(security): cap Sentry sampling via env defaults#358
kevinnft wants to merge 1 commit into
Quantarq:mainfrom
kevinnft:fix/sentry-sample-rates

Conversation

@kevinnft

Copy link
Copy Markdown

Summary

Closes #200.

Sentry was initialized with full-rate sampling via traces_sampler returning up to 1.0 and an unstable _experiments continuous profiling flag. This PR:

  • Caps sampling with SENTRY_TRACES_SAMPLE_RATE (default 0.1) and SENTRY_PROFILES_SAMPLE_RATE (default 0.1)
  • Removes _experiments
  • Logs active rates at startup
  • Documents both env vars in docs/environment_variables.md

Route-relative weighting is preserved (auth/bug-report keep the configured base rate; health is heavily downsampled).

Test plan

  • Code review of sentry_sdk.init call
  • Docs updated
  • CI full suite

Replace 100% traces_sample_rate and unstable _experiments profiling
with SENTRY_TRACES_SAMPLE_RATE / SENTRY_PROFILES_SAMPLE_RATE (default
0.1). Log active rates at startup and document both env vars.

Closes Quantarq#200

Signed-off-by: NossXBT <kevinnft@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tighten Sentry init (traces_sample_rate, profiling)

1 participant