Sha256: 7d887710ae666990e3edc35a1fa1931d26d183d73f738743fe1b8aae4ba86327

Contents?: true

Size: 904 Bytes

Versions: 15

Compression:

Stored size: 904 Bytes

Contents

module Appsignal
  module Integrations
    # @api private
    module WebmachinePlugin
      module FSM
        def run_with_appsignal
          transaction = Appsignal::Transaction.create(
            SecureRandom.uuid,
            Appsignal::Transaction::HTTP_REQUEST,
            request,
            :params_method => :query
          )

          transaction.set_action_if_nil("#{resource.class.name}##{request.method}")

          Appsignal.instrument("process_action.webmachine") do
            run_without_appsignal
          end

          Appsignal::Transaction.complete_current!
        end

        private

        def handle_exceptions_with_appsignal
          handle_exceptions_without_appsignal do
            begin
              yield
            rescue => e
              Appsignal.set_error(e)
              raise e
            end
          end
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
appsignal-2.3.7 lib/appsignal/integrations/webmachine.rb
appsignal-2.3.6 lib/appsignal/integrations/webmachine.rb
appsignal-2.3.6.beta.1 lib/appsignal/integrations/webmachine.rb
appsignal-2.3.4 lib/appsignal/integrations/webmachine.rb
appsignal-2.3.3 lib/appsignal/integrations/webmachine.rb
appsignal-2.3.3.beta.1 lib/appsignal/integrations/webmachine.rb
appsignal-2.3.2 lib/appsignal/integrations/webmachine.rb
appsignal-2.3.1 lib/appsignal/integrations/webmachine.rb
appsignal-2.3.0 lib/appsignal/integrations/webmachine.rb
appsignal-2.3.0.beta.3 lib/appsignal/integrations/webmachine.rb
appsignal-2.3.0.beta.2 lib/appsignal/integrations/webmachine.rb
appsignal-2.3.0.beta.1 lib/appsignal/integrations/webmachine.rb
appsignal-2.2.1 lib/appsignal/integrations/webmachine.rb
appsignal-2.2.0 lib/appsignal/integrations/webmachine.rb
appsignal-2.2.0.beta.1 lib/appsignal/integrations/webmachine.rb