Skip to content

Commit 7cf7b91

Browse files
committed
Remove the capture_exception_frame_locals configuration option
It's been marked as deprecated for a while now and should be removed in the next major release.
1 parent 7d86bb2 commit 7cf7b91

File tree

5 files changed

+3
-38
lines changed

5 files changed

+3
-38
lines changed

sentry-rails/examples/rails-6.0/config/initializers/sentry.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
config.traces_sample_rate = 1.0 # set a float between 0.0 and 1.0 to enable performance monitoring
66
config.dsn = 'https://2fb45f003d054a7ea47feb45898f7649@o447951.ingest.sentry.io/5434472'
77
config.release = `git branch --show-current`
8-
config.capture_exception_frame_locals = true
8+
config.include_local_variables = true
99
# you can use the pre-defined job for the async callback
1010
#
1111
# config.async = lambda do |event, hint|

sentry-rails/examples/rails-7.0/config/initializers/sentry.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
config.traces_sample_rate = 1.0 # set a float between 0.0 and 1.0 to enable performance monitoring
66
config.dsn = 'https://2fb45f003d054a7ea47feb45898f7649@o447951.ingest.sentry.io/5434472'
77
config.release = `git branch --show-current`
8-
config.capture_exception_frame_locals = true
8+
config.include_local_variables = true
99
# you can use the pre-defined job for the async callback
1010
#
1111
# config.async = lambda do |event, hint|

sentry-rails/spec/dummy/test_rails_app/app.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def self.name
8282
config.transport.transport_class = Sentry::DummyTransport
8383
# for sending events synchronously
8484
config.background_worker_threads = 0
85-
config.capture_exception_frame_locals = true
85+
config.include_local_variables = true
8686
yield(config, app) if block_given?
8787
end
8888
end

sentry-ruby/lib/sentry/configuration.rb

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -151,18 +151,6 @@ class Configuration
151151
# @return [Boolean, String]
152152
attr_accessor :spotlight
153153

154-
# @deprecated Use {#include_local_variables} instead.
155-
alias_method :capture_exception_frame_locals, :include_local_variables
156-
157-
# @deprecated Use {#include_local_variables=} instead.
158-
def capture_exception_frame_locals=(value)
159-
log_warn <<~MSG
160-
`capture_exception_frame_locals` is now deprecated in favor of `include_local_variables`.
161-
MSG
162-
163-
self.include_local_variables = value
164-
end
165-
166154
# You may provide your own LineCache for matching paths with source files.
167155
# This may be useful if you need to get source code from places other than the disk.
168156
# @see LineCache

sentry-ruby/spec/sentry/configuration_spec.rb

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,6 @@
11
require 'spec_helper'
22

33
RSpec.describe Sentry::Configuration do
4-
describe "#capture_exception_frame_locals" do
5-
it "passes/received the value to #include_local_variables" do
6-
subject.capture_exception_frame_locals = true
7-
expect(subject.include_local_variables).to eq(true)
8-
expect(subject.capture_exception_frame_locals).to eq(true)
9-
10-
subject.capture_exception_frame_locals = false
11-
expect(subject.include_local_variables).to eq(false)
12-
expect(subject.capture_exception_frame_locals).to eq(false)
13-
end
14-
15-
it "prints deprecation message when being assigned" do
16-
string_io = StringIO.new
17-
subject.logger = Logger.new(string_io)
18-
19-
subject.capture_exception_frame_locals = true
20-
21-
expect(string_io.string).to include(
22-
"WARN -- sentry: `capture_exception_frame_locals` is now deprecated in favor of `include_local_variables`."
23-
)
24-
end
25-
end
26-
274
describe "#csp_report_uri" do
285
it "returns nil if the dsn is not present" do
296
expect(subject.csp_report_uri).to eq(nil)

0 commit comments

Comments
 (0)