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

Remove config.capture_exception_frame_locals #2306

Open
wants to merge 2 commits into
base: 6.0-dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

### Breaking Changes

- Remove `config.async` [#1894](https://github.com/getsentry/sentry-ruby/pull/1894)
- Remove `config.async` ([#1894](https://github.com/getsentry/sentry-ruby/pull/1894))
- Remove `config.capture_exception_frame_locals` ([#2306](https://github.com/getsentry/sentry-ruby/pull/2306))

## Unreleased

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
config.traces_sample_rate = 1.0 # set a float between 0.0 and 1.0 to enable performance monitoring
config.dsn = 'https://2fb45f003d054a7ea47feb45898f7649@o447951.ingest.sentry.io/5434472'
config.release = `git branch --show-current`
config.capture_exception_frame_locals = true
config.include_local_variables = true
# you can use the pre-defined job for the async callback
#
# config.async = lambda do |event, hint|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
config.traces_sample_rate = 1.0 # set a float between 0.0 and 1.0 to enable performance monitoring
config.dsn = 'https://2fb45f003d054a7ea47feb45898f7649@o447951.ingest.sentry.io/5434472'
config.release = `git branch --show-current`
config.capture_exception_frame_locals = true
config.include_local_variables = true
# you can use the pre-defined job for the async callback
#
# config.async = lambda do |event, hint|
Expand Down
2 changes: 1 addition & 1 deletion sentry-rails/spec/dummy/test_rails_app/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def self.name
config.transport.transport_class = Sentry::DummyTransport
# for sending events synchronously
config.background_worker_threads = 0
config.capture_exception_frame_locals = true
config.include_local_variables = true
yield(config, app) if block_given?
end
end
Expand Down
12 changes: 0 additions & 12 deletions sentry-ruby/lib/sentry/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -151,18 +151,6 @@ class Configuration
# @return [Boolean, String]
attr_accessor :spotlight

# @deprecated Use {#include_local_variables} instead.
alias_method :capture_exception_frame_locals, :include_local_variables

# @deprecated Use {#include_local_variables=} instead.
def capture_exception_frame_locals=(value)
log_warn <<~MSG
`capture_exception_frame_locals` is now deprecated in favor of `include_local_variables`.
MSG

self.include_local_variables = value
end

# You may provide your own LineCache for matching paths with source files.
# This may be useful if you need to get source code from places other than the disk.
# @see LineCache
Expand Down
23 changes: 0 additions & 23 deletions sentry-ruby/spec/sentry/configuration_spec.rb
Original file line number Diff line number Diff line change
@@ -1,29 +1,6 @@
require 'spec_helper'

RSpec.describe Sentry::Configuration do
describe "#capture_exception_frame_locals" do
it "passes/received the value to #include_local_variables" do
subject.capture_exception_frame_locals = true
expect(subject.include_local_variables).to eq(true)
expect(subject.capture_exception_frame_locals).to eq(true)

subject.capture_exception_frame_locals = false
expect(subject.include_local_variables).to eq(false)
expect(subject.capture_exception_frame_locals).to eq(false)
end

it "prints deprecation message when being assigned" do
string_io = StringIO.new
subject.logger = Logger.new(string_io)

subject.capture_exception_frame_locals = true

expect(string_io.string).to include(
"WARN -- sentry: `capture_exception_frame_locals` is now deprecated in favor of `include_local_variables`."
)
end
end

describe "#csp_report_uri" do
it "returns nil if the dsn is not present" do
expect(subject.csp_report_uri).to eq(nil)
Expand Down