Sha256: d8b19e08e3a7945cf480c942940a73721e2c7bdc337cf36b9de45d3d9bd45018
Contents?: true
Size: 729 Bytes
Versions: 26
Compression:
Stored size: 729 Bytes
Contents
# frozen_string_literal: true module Appsignal class EventFormatter # @api private module ViewComponent class RenderFormatter BLANK = "" attr_reader :root_path def initialize @root_path = "#{Rails.root}/" end def format(payload) [payload[:name], payload[:identifier].sub(@root_path, BLANK)] end end end end end if defined?(Rails) && defined?(ViewComponent) Appsignal::EventFormatter.register( "render.view_component", Appsignal::EventFormatter::ViewComponent::RenderFormatter ) Appsignal::EventFormatter.register( "!render.view_component", Appsignal::EventFormatter::ViewComponent::RenderFormatter ) end
Version data entries
26 entries across 26 versions & 1 rubygems