Sha256: 652a541d2b22579b4194a8a69554a6bff1ca4da9e72520667049e333541778cc
Contents?: true
Size: 1.08 KB
Versions: 184
Compression:
Stored size: 1.08 KB
Contents
# frozen_string_literal: true module Appsignal module Integrations module ActionCableIntegration def perform_action(*args, &block) # The request is only the original websocket request env = connection.env request = ActionDispatch::Request.new(env) env[Appsignal::Hooks::ActionCableHook::REQUEST_ID] ||= request.request_id || SecureRandom.uuid transaction = Appsignal::Transaction.create( env[Appsignal::Hooks::ActionCableHook::REQUEST_ID], Appsignal::Transaction::ACTION_CABLE, request ) begin super rescue Exception => exception # rubocop:disable Lint/RescueException transaction.set_error(exception) raise exception ensure transaction.params = args.first transaction.set_action_if_nil("#{self.class}##{args.first["action"]}") transaction.set_metadata("path", request.path) transaction.set_metadata("method", "websocket") Appsignal::Transaction.complete_current! end end end end end
Version data entries
184 entries across 184 versions & 1 rubygems