Module: ElasticAPM::Spies::ResqueSpy::Ext Private
- Defined in:
- lib/elastic_apm/spies/resque.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #perform ⇒ Object private
Instance Method Details
#perform ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/elastic_apm/spies/resque.rb', line 29 def perform name = @payload && @payload['class']&.to_s transaction = ElasticAPM.start_transaction(name, TYPE) super transaction&.done 'success' transaction&.outcome = Transaction::Outcome::SUCCESS rescue ::Exception => e ElasticAPM.report(e, handled: false) transaction&.done 'error' transaction&.outcome = Transaction::Outcome::FAILURE raise ensure ElasticAPM.end_transaction end |