Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add support for $SENTRY_DEBUG and $SENTRY_SPOTLIGHT #2374

Merged
Prev Previous commit
Next Next commit
now?
  • Loading branch information
Burak Yigit Kaya committed Aug 15, 2024
commit 16b96e538ef07c65ca7d52fed11b901087391781
5 changes: 2 additions & 3 deletions sentry-ruby/lib/sentry/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class Configuration
include CustomInspection
include LoggingHelper
include ArgumentCheckingHelper
include EnvHelper

# Directories to be recognized as part of your app. e.g. if you
# have an `engines` dir at the root of your project, you may want
Expand Down Expand Up @@ -352,7 +351,7 @@ def add_post_initialization_callback(&block)

def initialize
self.app_dirs_pattern = nil
self.debug = env_to_bool(ENV["SENTRY_DEBUG"])
self.debug = Sentry::Utils::EnvHelper.env_to_bool(ENV["SENTRY_DEBUG"])
self.background_worker_threads = (processor_count / 2.0).ceil
self.background_worker_max_queue = BackgroundWorker::DEFAULT_MAX_QUEUE
self.backtrace_cleanup_callback = nil
Expand Down Expand Up @@ -381,7 +380,7 @@ def initialize
self.dsn = ENV['SENTRY_DSN']

spotlight_env = ENV['SENTRY_SPOTLIGHT']
spotlight_bool = env_to_bool(spotlight_env, strict: true)
spotlight_bool = Sentry::Utils::EnvHelper.env_to_bool(spotlight_env, strict: true)
self.spotlight = spotlight_bool.ni? ? spotlight_env : spotlight_bool
self.server_name = server_name_from_env
self.instrumenter = :sentry
Expand Down
Loading