README.md in isolator-0.5.0 vs README.md in isolator-0.6.0
- old
+ new
@@ -89,10 +89,14 @@
# Raise exception on offense
config.raise_exceptions = false # true in test env
# Send notifications to uniform_notifier
config.send_notifications = false
+
+ # Customize backtrace filtering (provide a callable)
+ # By default, just takes the top-5 lines
+ config.backtrace_filter = ->(backtrace) { backtrace.take(5) }
end
```
Isolator relys on [uniform_notifier][] to send custom notifications.
@@ -184,9 +188,20 @@
```
Possible `options` are:
- `exception_class` – an exception class to raise in case of offense
- `exception_message` – custom exception message (could be specified without a class)
+- `details_message` – a block to generate additional exceptin message information:
+
+```ruby
+Isolator.isolate :active_job,
+ target: ActiveJob::Base,
+ method_name: :enqueue,
+ exception_class: Isolator::BackgroundJobError,
+ details_message: ->(obj, _args) {
+ "#{obj.class.name}(#{obj.arguments})"
+ }
+```
You can also add some callbacks to be run before and after the transaction:
```ruby
Isolator.before_isolate do