Class: Appsignal::Aggregator::Middleware::ActionViewSanitizer
- Inherits:
-
Object
- Object
- Appsignal::Aggregator::Middleware::ActionViewSanitizer
- Defined in:
- lib/appsignal/aggregator/middleware/action_view_sanitizer.rb
Constant Summary collapse
- TARGET_EVENT_CATEGORY =
'action_view'.freeze
Instance Method Summary collapse
Instance Method Details
#call(event) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/appsignal/aggregator/middleware/action_view_sanitizer.rb', line 7 def call(event) if event.name.end_with?(TARGET_EVENT_CATEGORY) identifier = event.payload[:identifier] if identifier event.payload[:identifier] = identifier.gsub(root_path, '') end end yield end |
#root_path ⇒ Object
17 18 19 |
# File 'lib/appsignal/aggregator/middleware/action_view_sanitizer.rb', line 17 def root_path @root_path ||= "#{Rails.root.to_s}/" end |