Description
Isolator is a Ruby gem that detects non-atomic side effects performed inside database transactions, such as HTTP requests or background job enqueues that would still happen if the transaction rolled back. It also catches implicit transactions, for example a job enqueued from an after_create callback, a common mistake in Rails apps. It is meant for test suites and staging environments. Isolator works as soon as it is required: it detects the environment and loads only the adapters it needs, so it should be required after other gems. In tests it respects transactional tests and raises errors by default. Individual adapters can be disabled, for instance the Active Job spy when you use a transaction-safe backend like Que, and notifications go through uniform_notifier. Experimental multi-database support arrived in v0.7.0. It is built by Evil Martians.…
Highlights
- Detects HTTP calls, job enqueues and other side effects inside transactions
- Catches implicit transactions such as after_create callbacks
- Plug-and-play once required
- Transactional test support with errors raised in tests
- Configurable adapters and uniform_notifier alerts
- Experimental multiple database support
Ratings & Reviews
No ratings yet
Be the first to rate Isolator.
People also visit
Rails Performance
Monitor performance of you Rails applications (self-hosted and free)
Isolator FAQ
What problem does Isolator catch?
Non-atomic interactions inside database transactions, like making network calls or enqueueing background jobs that cannot be rolled back if the transaction fails.
Where should I use it?
In tests and on staging.
How do I install it?
Add it to your Gemfile. Make sure isolator is required last, since it detects which adapters to load based on what is already loaded.
How do I avoid false positives with a safe job backend?
Disable the :active_job adapter in an initializer if you use a transaction-safe Active Job adapter such as Que.
What are the best Isolator alternatives?
Popular alternatives to Isolator include Rorvswild, DeadBro and Airbroke. See all Isolator alternatives







