Sha256: 4b6ef00efa7a7bc69632f6000d2bc8d00758054aa706649e78195843032c5f87

Contents?: true

Size: 715 Bytes

Versions: 56

Compression:

Stored size: 715 Bytes

Contents

# frozen_string_literal: true

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

56 entries across 56 versions & 1 rubygems

Version Path
appsignal-2.8.1 lib/appsignal/event_formatter/action_view/render_formatter.rb
appsignal-2.8.1-java lib/appsignal/event_formatter/action_view/render_formatter.rb
appsignal-2.8.1.alpha.1-java lib/appsignal/event_formatter/action_view/render_formatter.rb
appsignal-2.8.1.alpha.1 lib/appsignal/event_formatter/action_view/render_formatter.rb
appsignal-2.8.0 lib/appsignal/event_formatter/action_view/render_formatter.rb
appsignal-2.8.0-java lib/appsignal/event_formatter/action_view/render_formatter.rb
appsignal-2.7.3.beta.2-java lib/appsignal/event_formatter/action_view/render_formatter.rb
appsignal-2.7.3.beta.2 lib/appsignal/event_formatter/action_view/render_formatter.rb
appsignal-2.7.3.beta.1 lib/appsignal/event_formatter/action_view/render_formatter.rb
appsignal-2.7.3.beta.1-java lib/appsignal/event_formatter/action_view/render_formatter.rb
appsignal-2.7.2-java lib/appsignal/event_formatter/action_view/render_formatter.rb
appsignal-2.7.2 lib/appsignal/event_formatter/action_view/render_formatter.rb
appsignal-2.7.1 lib/appsignal/event_formatter/action_view/render_formatter.rb
appsignal-2.7.1-java lib/appsignal/event_formatter/action_view/render_formatter.rb
appsignal-2.8.0.alpha.1-java lib/appsignal/event_formatter/action_view/render_formatter.rb
appsignal-2.8.0.alpha.1 lib/appsignal/event_formatter/action_view/render_formatter.rb
appsignal-2.7.0 lib/appsignal/event_formatter/action_view/render_formatter.rb
appsignal-2.7.0-java lib/appsignal/event_formatter/action_view/render_formatter.rb
appsignal-2.7.0.beta.2 lib/appsignal/event_formatter/action_view/render_formatter.rb
appsignal-2.7.0.beta.2-java lib/appsignal/event_formatter/action_view/render_formatter.rb