Sha256: 807411486ca50b26131dbb8bf2ee218a41bd3d6bbd13e5f929a24e0fd557b475

Contents?: true

Size: 517 Bytes

Versions: 33

Compression:

Stored size: 517 Bytes

Contents

module Appsignal
  class Aggregator
    module Middleware
      class ActionViewSanitizer
        TARGET_EVENT_CATEGORY = 'action_view'.freeze

        def call(event)
          if event.name.end_with?(TARGET_EVENT_CATEGORY)
            identifier = event.payload[:identifier]
            if identifier
              identifier.gsub!(root_path, '')
            end
          end
          yield
        end

        def root_path
          @root_path ||= "#{Rails.root.to_s}/"
        end
      end
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
appsignal-0.8.1.beta.1 lib/appsignal/aggregator/middleware/action_view_sanitizer.rb
appsignal-0.8.1.beta.0 lib/appsignal/aggregator/middleware/action_view_sanitizer.rb
appsignal-0.8.0 lib/appsignal/aggregator/middleware/action_view_sanitizer.rb
appsignal-0.8.0.beta.1 lib/appsignal/aggregator/middleware/action_view_sanitizer.rb
appsignal-0.8.0.beta.0 lib/appsignal/aggregator/middleware/action_view_sanitizer.rb
appsignal-0.8.0.alpha.0 lib/appsignal/aggregator/middleware/action_view_sanitizer.rb
appsignal-0.7.1 lib/appsignal/aggregator/middleware/action_view_sanitizer.rb
appsignal-0.7.1.beta.1 lib/appsignal/aggregator/middleware/action_view_sanitizer.rb
appsignal-0.7.0.beta.1 lib/appsignal/aggregator/middleware/action_view_sanitizer.rb
appsignal-0.7.0.alpha.4 lib/appsignal/aggregator/middleware/action_view_sanitizer.rb
appsignal-0.7.0.alpha.3 lib/appsignal/aggregator/middleware/action_view_sanitizer.rb
appsignal-0.7.0.alpha.2 lib/appsignal/aggregator/middleware/action_view_sanitizer.rb
appsignal-0.7.0.alpha.1 lib/appsignal/aggregator/middleware/action_view_sanitizer.rb