Features
-
Expose
:values
inExceptionInterface
, so that it can be accessed inbefore_send
underevent.exception.values
#1843 -
Add top level
Sentry.close
API #1844- Cleans up SDK state and sets it to uninitialized
- No-ops all SDK APIs and also disables the transport layer, so nothing will be sent to Sentry after closing the SDK
-
Handle exception with large stacktrace without dropping entire item #1807
-
Capture Rails runner's exceptions before exiting #1820
-
Add
Sentry.with_exception_captured
helper #1814Usage:
Sentry.with_exception_captured do 1/1 #=> 1 will be returned end Sentry.with_exception_captured do 1/0 #=> ZeroDivisionError will be reported and re-raised end
-
Prepare for Rails 7.1's error reporter API change #1834
-
Set
sentry.error_event_id
in request env if the middleware captures errors #1849If the SDK's Rack middleware captures an error, the reported event's id will be stored in the request env. For example:
env["sentry.error_event_id"] #=> "507bd4c1a07e4355bb70bcd7afe8ab17"
Users can display this information on the error page via a middleware as proposed in #1846
Bug Fixes
- Respect
report_rescued_exceptions
config #1847- Fixes #1840
- Rescue event's to JSON conversion error #1853
- Rescue
ThreadError
inSessionFlusher
and stop creating threads if flusher is killed #1851- Fixes #1848
Refactoring
- Move envelope item processing/trimming logic to the Item class #1824
- Replace sentry-ruby-core with sentry-ruby as integration dependency #1825
Test Helpers
The SDK now provides a set of test helpers to help users setup and teardown Sentry related tests.
To get started:
require "sentry/test_helper"
# in minitest
class MyTest < Minitest::Test
include Sentry::TestHelper
# ...
end
# in RSpec
RSpec.configure do |config|
config.include Sentry::TestHelper
# ...
end
It's still an early attempt so please give us feedback in #1680.