Skip to content
Draft
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
33 changes: 0 additions & 33 deletions .github/workflows/prepare_raven_release.yml

This file was deleted.

69 changes: 0 additions & 69 deletions .github/workflows/sentry_raven_test.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Gemfile.lock
.idea
*.rdb
.rgignore
.claude

node_modules
.vite
Expand Down
1 change: 0 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Style/RedundantFreeze:

AllCops:
Exclude:
- "sentry-raven/**/*"
- "sentry-*/tmp/**/*"
- "sentry-*/examples/**/*"
- "sentry-*/spec/versioned/2.7/**/*"
20 changes: 0 additions & 20 deletions .scripts/bump-version.rb

This file was deleted.

39 changes: 38 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,40 @@
## Unreleased (6.0.0)

### Breaking Changes

- 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))
- 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.

### Features

- Add `config.trace_ignore_status_codes` to control which response codes to ignore for tracing ([#2725](https://github.com/getsentry/sentry-ruby/pull/2725))

You can pass in an Array of individual status codes or ranges of status codes.

```ruby
Sentry.init do |config|
# ...
# will ignore 404, 501, 502, 503
config.trace_ignore_status_codes = [404, (501..503)]
end
```

### Internal

- Archive [`sentry-raven`](https://github.com/getsentry/raven-ruby) ([#2708](https://github.com/getsentry/sentry-ruby/pull/2708))
- Don't send `sample_rate` client reports for profiles if profiling is disabled ([#2728](https://github.com/getsentry/sentry-ruby/pull/2728))

## 5.28.0

### Features
Expand All @@ -7,7 +44,7 @@
### Miscellaneous

- Deprecate all Metrics related APIs [#2726](https://github.com/getsentry/sentry-ruby/pull/2726)

Sentry [no longer has the Metrics Beta offering](https://sentry.zendesk.com/hc/en-us/articles/26369339769883-Metrics-Beta-Ended-on-October-7th) so
all the following APIs linked to Metrics have been deprecated and will be removed in the next major.

Expand Down
16 changes: 8 additions & 8 deletions sentry-delayed_job/spec/sentry/delayed_job_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def do_nothing_with_args(a)
enqueued_job.invoke_job

expect(transport.events.count).to eq(1)
event = transport.events.last.to_hash
event = transport.events.last.to_h
expect(event[:message]).to eq("report")
expect(event[:contexts][:"Delayed-Job"][:id]).to eq(enqueued_job.id.to_s)
expect(event[:tags]).to eq({ "delayed_job.id" => enqueued_job.id.to_s, "delayed_job.queue" => nil })
Expand All @@ -68,7 +68,7 @@ def do_nothing_with_args(a)
enqueued_job.invoke_job

expect(transport.events.count).to eq(1)
event = transport.events.last.to_hash
event = transport.events.last.to_h
expect(event[:message]).to eq("tagged report")
expect(event[:tags]).to eq({ "delayed_job.id" => enqueued_job.id.to_s, "delayed_job.queue" => nil, number: 1 })

Expand All @@ -77,7 +77,7 @@ def do_nothing_with_args(a)
enqueued_job.invoke_job

expect(transport.events.count).to eq(2)
event = transport.events.last.to_hash
event = transport.events.last.to_h
expect(event[:tags]).to eq({ "delayed_job.id" => enqueued_job.id.to_s, "delayed_job.queue" => nil })
end

Expand All @@ -93,7 +93,7 @@ def do_nothing_with_args(a)
end.to raise_error(ZeroDivisionError)

expect(transport.events.count).to eq(1)
event = transport.events.last.to_hash
event = transport.events.last.to_h

expect(event[:sdk]).to eq({ name: "sentry.ruby.delayed_job", version: described_class::VERSION })
expect(event.dig(:exception, :values, 0, :type)).to eq("ZeroDivisionError")
Expand All @@ -109,7 +109,7 @@ def do_nothing_with_args(a)
end.to raise_error(RuntimeError)

expect(transport.events.count).to eq(1)
event = transport.events.last.to_hash
event = transport.events.last.to_h

expect(event[:tags]).to eq({ "delayed_job.id" => enqueued_job.id.to_s, "delayed_job.queue" => nil, number: 1 })
expect(Sentry.get_current_scope.extra).to eq({})
Expand All @@ -123,7 +123,7 @@ def do_nothing_with_args(a)
end.to raise_error(ZeroDivisionError)

expect(transport.events.count).to eq(2)
event = transport.events.last.to_hash
event = transport.events.last.to_h
expect(event[:tags]).to eq({ "delayed_job.id" => enqueued_job.id.to_s, "delayed_job.queue" => nil })
expect(Sentry.get_current_scope.extra).to eq({})
expect(Sentry.get_current_scope.tags).to eq({})
Expand Down Expand Up @@ -228,7 +228,7 @@ def perform
it "injects ActiveJob information to the event" do
expect(transport.events.count).to eq(1)

event = transport.events.last.to_hash
event = transport.events.last.to_h
expect(event[:message]).to eq("report from ActiveJob")
expect(event[:tags]).to match({ "delayed_job.id" => anything, "delayed_job.queue" => "default", number: 1 })
expect(event[:contexts][:"Active-Job"][:job_class]).to eq("ReportingJob")
Expand All @@ -255,7 +255,7 @@ def perform
it "injects ActiveJob information to the event" do
expect(transport.events.count).to eq(1)

event = transport.events.last.to_hash
event = transport.events.last.to_h
expect(event.dig(:exception, :values, 0, :type)).to eq("ZeroDivisionError")
expect(event[:tags]).to match({ "delayed_job.id" => anything, "delayed_job.queue" => "default", number: 2 })
expect(event[:contexts][:"Active-Job"][:job_class]).to eq("FailedJob")
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
18 changes: 7 additions & 11 deletions sentry-rails/lib/sentry/rails/active_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,13 @@ def record(job, &block)
Sentry.with_scope do |scope|
begin
scope.set_transaction_name(job.class.name, source: :task)
transaction =
if job.is_a?(::Sentry::SendEventJob)
nil
else
Sentry.start_transaction(
name: scope.transaction_name,
source: scope.transaction_source,
op: OP_NAME,
origin: SPAN_ORIGIN
)
end

transaction = Sentry.start_transaction(
name: scope.transaction_name,
source: scope.transaction_source,
op: OP_NAME,
origin: SPAN_ORIGIN
)

scope.set_span(transaction) if transaction

Expand Down

This file was deleted.

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
Loading
Loading