lib/resque/failure/rollbar.rb in resque-rollbar-0.2.0 vs lib/resque/failure/rollbar.rb in resque-rollbar-0.3.0
- old
+ new
@@ -3,10 +3,26 @@
module Resque
module Failure
class Rollbar < Base
def save
- ::Rollbar.error(exception, payload)
+ ::Rollbar.error(exception, rollbar_payload)
+ end
+
+ def rollbar_payload
+ if use_exception_level_filters?
+ payload.merge(:use_exception_level_filters => true)
+ else
+ payload
+ end
+ end
+
+ def use_exception_level_filters?
+ rollbar_version.split('.')[1].to_i > 3
+ end
+
+ def rollbar_version
+ ::Rollbar::VERSION
end
end
end
end