Skip to content

Commit 2a1c4ba

Browse files
committed
Enable profiling and tracing with Sentry
1 parent cbafe60 commit 2a1c4ba

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

config/settings/production.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,12 @@
274274
# https://docs.sentry.io/platforms/python/integrations/redis/#options
275275
RedisIntegration(),
276276
],
277+
# Enable tracing and profiling but with sampling
278+
# Setting a value of 1.0 will send 100% of traces to Sentry
279+
# https://docs.sentry.io/platforms/python/tracing/
280+
traces_sample_rate=env.float("SENTRY_TRACING_SAMPLE_RATE", default=0.2),
281+
# https://docs.sentry.io/platforms/python/profiling/
282+
profiles_sample_rate=env.float("SENTRY_PROFILES_SAMPLE_RATE", default=0.05),
277283
)
278284

279285

0 commit comments

Comments
 (0)