Sha256: 9ce094299ea04566b7efd3377f77ac964db7656fb3b2b586cb22b92ab83a45da
Contents?: true
Size: 702 Bytes
Versions: 62
Compression:
Stored size: 702 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) Appsignal::EventFormatter.register( "render.view_component", Appsignal::EventFormatter::ViewComponent::RenderFormatter ) Appsignal::EventFormatter.register( "!render.view_component", Appsignal::EventFormatter::ViewComponent::RenderFormatter ) end
Version data entries
62 entries across 62 versions & 1 rubygems