Sha256: 0af437924de13cf63a7462847f7ab264664193b39733fc9619337b7a164fa02c

Contents?: true

Size: 684 Bytes

Versions: 8

Compression:

Stored size: 684 Bytes

Contents

module Appsignal
  class EventFormatter
    # @api private
    module ActionView
      class RenderFormatter
        BLANK = "".freeze

        attr_reader :root_path

        def initialize
          @root_path = "#{Rails.root}/".freeze
        end

        def format(payload)
          return nil unless payload[:identifier]
          [payload[:identifier].sub(root_path, BLANK), nil]
        end
      end
    end
  end
end

Appsignal::EventFormatter.register(
  "render_partial.action_view",
  Appsignal::EventFormatter::ActionView::RenderFormatter
)
Appsignal::EventFormatter.register(
  "render_template.action_view",
  Appsignal::EventFormatter::ActionView::RenderFormatter
)

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
appsignal-2.5.3-java lib/appsignal/event_formatter/action_view/render_formatter.rb
appsignal-2.5.3 lib/appsignal/event_formatter/action_view/render_formatter.rb
appsignal-2.5.3.alpha.2 lib/appsignal/event_formatter/action_view/render_formatter.rb
appsignal-2.5.3.alpha.2-java lib/appsignal/event_formatter/action_view/render_formatter.rb
appsignal-2.5.3.alpha.1 lib/appsignal/event_formatter/action_view/render_formatter.rb
appsignal-2.5.3.alpha.1-java lib/appsignal/event_formatter/action_view/render_formatter.rb
appsignal-2.5.2-java lib/appsignal/event_formatter/action_view/render_formatter.rb
appsignal-2.5.2 lib/appsignal/event_formatter/action_view/render_formatter.rb