Sha256: b115631c885af1bb46325568e30174ed34f73ab77268939fabffe0d357908c7e
Contents?: true
Size: 920 Bytes
Versions: 26
Compression:
Stored size: 920 Bytes
Contents
module Skylight module Normalizers module ActionController class ProcessAction < Normalizer register "process_action.action_controller" CAT = "app.controller.request".freeze PAYLOAD_KEYS = %w[ controller action params format method path ].map(&:to_sym).freeze def normalize(trace, name, payload) trace.endpoint = controller_action(payload) [ CAT, trace.endpoint, nil, normalize_payload(payload) ] end private def controller_action(payload) "#{payload[:controller]}##{payload[:action]}" end def normalize_payload(payload) normalized = {} PAYLOAD_KEYS.each do |key| val = payload[key] val = val.inspect unless val.is_a?(String) || val.is_a?(Numeric) normalized[key] = val end normalized end end end end end
Version data entries
26 entries across 26 versions & 2 rubygems