Method: Sentry::Configuration#initialize

Defined in:
lib/sentry/configuration.rb

#initializeConfiguration

Returns a new instance of Configuration.

[View source]

405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
# File 'lib/sentry/configuration.rb', line 405

def initialize
  self.app_dirs_pattern = APP_DIRS_PATTERN
  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
  self.strip_backtrace_load_path = true
  self.max_breadcrumbs = BreadcrumbBuffer::DEFAULT_SIZE
  self.breadcrumbs_logger = []
  self.context_lines = 3
  self.include_local_variables = false
  self.environment = environment_from_env
  self.enabled_environments = []
  self.exclude_loggers = []
  self.excluded_exceptions = IGNORE_DEFAULT + PUMA_IGNORE_DEFAULT
  self.inspect_exception_causes_for_exclusion = true
  self.linecache = ::Sentry::LineCache.new
  self.logger = ::Sentry::Logger.new(STDOUT)
  self.project_root = Dir.pwd
  self.propagate_traces = true

  self.sample_rate = 1.0
  self.send_modules = true
  self.send_default_pii = false
  self.skip_rake_integration = false
  self.send_client_reports = true
  self.auto_session_tracking = true
  self.enable_backpressure_handling = false
  self.trusted_proxies = []
  self.dsn = ENV["SENTRY_DSN"]

  spotlight_env = ENV["SENTRY_SPOTLIGHT"]
  spotlight_bool = Sentry::Utils::EnvHelper.env_to_bool(spotlight_env, strict: true)
  self.spotlight = spotlight_bool.nil? ? (spotlight_env || false) : spotlight_bool
  self.server_name = server_name_from_env
  self.instrumenter = :sentry
  self.trace_propagation_targets = [PROPAGATION_TARGETS_MATCH_ALL]
  self.enabled_patches = DEFAULT_PATCHES.dup

  self.before_send = nil
  self.before_send_transaction = nil
  self.rack_env_whitelist = RACK_ENV_WHITELIST_DEFAULT
  self.traces_sampler = nil
  self.enable_tracing = nil

  self.profiler_class = Sentry::Profiler

  @transport = Transport::Configuration.new
  @cron = Cron::Configuration.new
  @metrics = Metrics::Configuration.new
  @gem_specs = Hash[Gem::Specification.map { |spec| [spec.name, spec.version.to_s] }] if Gem::Specification.respond_to?(:map)

  run_post_initialization_callbacks
end