Sha256: c614e759991f1c2a49470517db0e26142f5cfd84c19b9acb52b267701c776e99

Contents?: true

Size: 984 Bytes

Versions: 160

Compression:

Stored size: 984 Bytes

Contents

# frozen_string_literal: true

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 Exception => e # rubocop:disable Lint/RescueException
              Appsignal.set_error(e)
              raise e
            end
          end
        end
      end
    end
  end
end

Version data entries

160 entries across 160 versions & 1 rubygems

Version Path
appsignal-2.11.10-java lib/appsignal/integrations/webmachine.rb
appsignal-2.11.10 lib/appsignal/integrations/webmachine.rb
appsignal-2.11.9-java lib/appsignal/integrations/webmachine.rb
appsignal-2.11.9 lib/appsignal/integrations/webmachine.rb
appsignal-2.11.8-java lib/appsignal/integrations/webmachine.rb
appsignal-2.11.8 lib/appsignal/integrations/webmachine.rb
appsignal-2.11.7 lib/appsignal/integrations/webmachine.rb
appsignal-2.11.7-java lib/appsignal/integrations/webmachine.rb
appsignal-2.11.6 lib/appsignal/integrations/webmachine.rb
appsignal-2.11.6-java lib/appsignal/integrations/webmachine.rb
appsignal-2.11.5-java lib/appsignal/integrations/webmachine.rb
appsignal-2.11.5 lib/appsignal/integrations/webmachine.rb
appsignal-2.11.4-java lib/appsignal/integrations/webmachine.rb
appsignal-2.11.4 lib/appsignal/integrations/webmachine.rb
appsignal-2.11.3-java lib/appsignal/integrations/webmachine.rb
appsignal-2.11.3 lib/appsignal/integrations/webmachine.rb
appsignal-2.11.2-java lib/appsignal/integrations/webmachine.rb
appsignal-2.11.2 lib/appsignal/integrations/webmachine.rb
appsignal-2.11.1-java lib/appsignal/integrations/webmachine.rb
appsignal-2.11.1 lib/appsignal/integrations/webmachine.rb