File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ def exception_locals_tp
102102 # @example Enable logs in configuration
103103 # Sentry.init do |config|
104104 # config.dsn = "YOUR_DSN"
105- # config._experiments = { enable_logs: true }
105+ # config.enable_logs = true
106106 # end
107107 #
108108 # @example Basic usage
@@ -264,7 +264,7 @@ def init(&block)
264264 # Initialize the public-facing Structured Logger if logs are enabled
265265 # This creates a StructuredLogger instance that implements Sentry's SDK telemetry logs protocol
266266 # @see https://develop.sentry.dev/sdk/telemetry/logs/
267- @logger = StructuredLogger . new ( config ) if config . _experiments [ : enable_logs]
267+ @logger = StructuredLogger . new ( config ) if config . enable_logs
268268
269269 config . detect_release
270270 apply_patches ( config )
Original file line number Diff line number Diff line change @@ -276,6 +276,10 @@ def logger
276276 # @return [Proc]
277277 attr_accessor :traces_sampler
278278
279+ # Enable Structured Logging
280+ # @return [Boolean]
281+ attr_accessor :enable_logs
282+
279283 # Easier way to use performance tracing
280284 # If set to true, will set traces_sample_rate to 1.0
281285 # @deprecated It will be removed in the next major release.
@@ -464,6 +468,7 @@ def initialize
464468 self . rack_env_whitelist = RACK_ENV_WHITELIST_DEFAULT
465469 self . traces_sampler = nil
466470 self . enable_tracing = nil
471+ self . enable_logs = true
467472
468473 self . profiler_class = Sentry ::Profiler
469474
Original file line number Diff line number Diff line change 1717 before do
1818 perform_basic_setup do |config |
1919 config . max_log_events = 1
20- config . _experiments = { enable_logs : true }
20+ config . enable_logs = true
2121 end
2222 end
2323
You can’t perform that action at this time.
0 commit comments