Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@

### Breaking Changes

- Remove `config.async` [#1894](https://github.com/getsentry/sentry-ruby/pull/1894)
- Remove deprecated `config.async` [#1894](https://github.com/getsentry/sentry-ruby/pull/1894)
- Remove deprecated `Sentry::Metrics` and `config.metrics` and all metrics related code ([#2729](https://github.com/getsentry/sentry-ruby/pull/2729))
- Remove deprecated `config.capture_exception_frame_locals`, use `include_local_variables` instead ([#2730](https://github.com/getsentry/sentry-ruby/pull/2730))
- Remove deprecated `config.enable_tracing`, use `config.traces_sample_rate = 1.0` instead ([#2731](https://github.com/getsentry/sentry-ruby/pull/2731))
- Remove deprecated `config.logger=`, use `config.sdk_logger=` instead ([#2732](https://github.com/getsentry/sentry-ruby/pull/2732))
- Remove deprecated `Sentry::Rails::Tracing::ActionControllerSubscriber` ([#2733](https://github.com/getsentry/sentry-ruby/pull/2733))
- Remove `:monotonic_active_support_logger` from `config.breadcrumbs_logger` ([#2717](https://github.com/getsentry/sentry-ruby/pull/2717))
- Migrate from to_hash to to_h ([#2351](https://github.com/getsentry/sentry-ruby/pull/2351))
- Add `before_send_check_in` for applying to `CheckInEvent` ([#2703](https://github.com/getsentry/sentry-ruby/pull/2703))
- Returning a hash from `before_send` and `before_send_transaction` is no longer supported and will drop the event.
- Remove stacktrace trimming ([#2714](https://github.com/getsentry/sentry-ruby/pull/2714))
- `config.enabled_environments` now defaults to `nil` instead of `[]` for sending to all environments ([#2716](https://github.com/getsentry/sentry-ruby/pull/2716))
- Remove `:monotonic_active_support_logger` from `config.breadcrumbs_logger` ([#2717](https://github.com/getsentry/sentry-ruby/pull/2717))
- Requests which have response status codes in the inclusive ranges `[(301..303), (305..399), (401..404)]` will no longer create transactions by default. See `config.trace_ignore_status_codes` below to control what gets traced.
- Remove `Sentry::Metrics` and `config.metrics` and all metrics related code ([#2729](https://github.com/getsentry/sentry-ruby/pull/2729))

### Features

Expand Down
2 changes: 1 addition & 1 deletion sentry-rails/benchmarks/allocation_comparison.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
end

app = create_app do |config|
config.logger = ::Logger.new(STDOUT)
config.sdk_logger = ::Logger.new(STDOUT)
config.transport.transport_class = Sentry::BenchmarkTransport
config.breadcrumbs_logger = [:active_support_logger]
end
Expand Down
2 changes: 1 addition & 1 deletion sentry-rails/benchmarks/allocation_report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
end

app = create_app do |config|
config.logger = ::Logger.new(STDOUT)
config.sdk_logger = ::Logger.new(STDOUT)
config.transport.transport_class = Sentry::BenchmarkTransport
config.breadcrumbs_logger = [:active_support_logger]
end
Expand Down
2 changes: 1 addition & 1 deletion sentry-rails/examples/minimum-rails/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

Sentry.init do |config|
config.dsn = 'https://[email protected]/5434472'
config.logger = Logger.new($stdout)
config.sdk_logger = Logger.new($stdout)
end

ActiveSupport::Deprecation.silenced = true
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://[email protected]/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://[email protected]/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
1 change: 0 additions & 1 deletion sentry-rails/lib/sentry/rails/configuration.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# frozen_string_literal: true

require "sentry/rails/tracing/action_controller_subscriber"
require "sentry/rails/tracing/action_view_subscriber"
require "sentry/rails/tracing/active_record_subscriber"
require "sentry/rails/tracing/active_storage_subscriber"
Expand Down
15 changes: 0 additions & 15 deletions sentry-rails/lib/sentry/rails/instrument_payload_cleanup_helper.rb

This file was deleted.

This file was deleted.

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 @@ -105,7 +105,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

This file was deleted.

2 changes: 1 addition & 1 deletion sentry-ruby/benchmarks/allocation_comparison.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
require "sentry/benchmarks/benchmark_transport"

Sentry.init do |config|
config.logger = ::Logger.new(nil)
config.sdk_logger = ::Logger.new(nil)
config.dsn = "dummy://12345:[email protected]:3000/sentry/42"
config.transport.transport_class = Sentry::BenchmarkTransport
config.breadcrumbs_logger = [:sentry_logger]
Expand Down
2 changes: 1 addition & 1 deletion sentry-ruby/benchmarks/allocation_report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
require "sentry/benchmarks/benchmark_transport"

Sentry.init do |config|
config.logger = ::Logger.new(nil)
config.sdk_logger = ::Logger.new(nil)
config.dsn = "dummy://12345:[email protected]:3000/sentry/42"
config.transport.transport_class = Sentry::BenchmarkTransport
config.breadcrumbs_logger = [:sentry_logger]
Expand Down
44 changes: 1 addition & 43 deletions sentry-ruby/lib/sentry/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -176,18 +176,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 All @@ -204,18 +192,6 @@ def capture_exception_frame_locals=(value)
# @return [String, nil]
attr_accessor :sdk_debug_transport_log_file

# @deprecated Use {#sdk_logger=} instead.
def logger=(logger)
warn "[sentry] `config.logger=` is deprecated. Please use `config.sdk_logger=` instead."
self.sdk_logger = logger
end

# @deprecated Use {#sdk_logger} instead.
def logger
warn "[sentry] `config.logger` is deprecated. Please use `config.sdk_logger` instead."
self.sdk_logger
end

# Project directory root for in_app detection. Could be Rails root, etc.
# Set automatically for Rails.
# @return [String]
Expand Down Expand Up @@ -297,12 +273,6 @@ def logger
# @return [StructuredLoggingConfiguration]
attr_reader :structured_logging

# Easier way to use performance tracing
# If set to true, will set traces_sample_rate to 1.0
# @deprecated It will be removed in the next major release.
# @return [Boolean, nil]
attr_reader :enable_tracing

# Send diagnostic client reports about dropped events, true by default
# tries to attach to an existing envelope max once every 30s
# @return [Boolean]
Expand Down Expand Up @@ -519,7 +489,6 @@ def initialize
self.before_send_log = nil
self.rack_env_whitelist = RACK_ENV_WHITELIST_DEFAULT
self.traces_sampler = nil
self.enable_tracing = nil
self.enable_logs = false

self.profiler_class = Sentry::Profiler
Expand Down Expand Up @@ -621,17 +590,6 @@ def trace_ignore_status_codes=(codes)
@trace_ignore_status_codes = codes
end

def enable_tracing=(enable_tracing)
unless enable_tracing.nil?
log_warn <<~MSG
`enable_tracing` is now deprecated in favor of `traces_sample_rate = 1.0`.
MSG
end

@enable_tracing = enable_tracing
@traces_sample_rate ||= 1.0 if enable_tracing
end

def traces_sample_rate=(traces_sample_rate)
@traces_sample_rate = traces_sample_rate
end
Expand Down Expand Up @@ -696,7 +654,7 @@ def valid_sample_rate?(sample_rate)
def tracing_enabled?
valid_sampler = !!((valid_sample_rate?(@traces_sample_rate)) || @traces_sampler)

(@enable_tracing != false) && valid_sampler && sending_allowed?
valid_sampler && sending_allowed?
end

def profiling_enabled?
Expand Down
Loading
Loading