Allow runtime configuration of Sentry tracing sample rate

This commit is contained in:
Andrew Kvalheim 2023-06-09 11:06:17 -07:00
parent bd937534d3
commit 31ffa102a7

View file

@ -4,7 +4,7 @@ Sentry.init do |config|
# To activate performance monitoring, set one of these options.
# We recommend adjusting the value in production:
config.traces_sample_rate = 0.5
config.traces_sample_rate = ENV.fetch('OSEM_SENTRY_TRACES_SAMPLE_RATE', '0.5').to_f
# or
# config.traces_sampler = lambda do |context|
# true