Sha256: 737abb2859a870182f2fe9ac7510dad70a0e5c54b8aa3b2c6a03d7b28bb0418e
Contents?: true
Size: 1.05 KB
Versions: 7
Compression:
Stored size: 1.05 KB
Contents
# frozen_string_literal: true module PlainApm module Hooks class ActionPack < ActiveSupportSubscriber NOTIFICATION_PATTERN = /\A[^!]\w+\.action_controller\Z/.freeze private def notification_pattern NOTIFICATION_PATTERN end def payload(event) name, base = attributes_from_notification(event) payload = event.payload case name when "process_action" base.tap do |o| o[:controller] = payload[:controller] o[:action] = payload[:action] o[:params] = payload[:params] o[:format] = payload[:format] o[:method] = payload[:method] o[:path] = payload[:path] o[:status] = payload[:status] end when "redirect_to", "start_processing", "halted_callback", "send_file", "send_data" nil when "read_fragment", "write_fragment", "exist_fragment?", "expire_fragment" # controller, action, key nil else nil end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems