File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -217,12 +217,12 @@ async def lifespan(app: FastAPI):
217217 integrations = [FastApiIntegration ()],
218218 # Enable sending logs to Sentry
219219 enable_logs = True ,
220- # Set traces_sample_rate to 1.0 to capture 100%
221- # of transactions for tracing.
222- traces_sample_rate = 1.0 ,
223- # Set profile_session_sample_rate to 1.0 to profile 100%
224- # of profile sessions .
225- profile_session_sample_rate = 1.0 ,
220+ traces_sample_rate = float ( os . getenv ( "SENTRY_TRACES_SAMPLE_RATE" , " 1.0" )),
221+ # The profiler samples frames across threads, which can segfault the
222+ # interpreter on Python 3.11 (frame_getback race, e.g.
223+ # https://github.com/getsentry/sentry-python/issues/2386), so it is
224+ # off unless explicitly enabled .
225+ profile_session_sample_rate = float ( os . getenv ( "SENTRY_PROFILE_SESSION_SAMPLE_RATE" , "0.0" )) ,
226226 # Set profile_lifecycle to "trace" to automatically
227227 # run the profiler on when there is an active transaction
228228 profile_lifecycle = "trace" ,
You can’t perform that action at this time.
0 commit comments