lib/appsignal.rb in appsignal-0.8.7.alpha.1 vs lib/appsignal.rb in appsignal-0.8.7

- old
+ new

@@ -127,9 +127,19 @@ end def is_ignored_exception?(exception) Appsignal.config[:ignore_exceptions].include?(exception.class.name) end + + # Convenience method for skipping instrumentations around a block of code. + # + # @since 0.8.7 + def without_instrumentation + agent.paused = true + yield + ensure + agent.paused = false + end end end require 'appsignal/agent' require 'appsignal/aggregator'