Class: NewRelic::Agent::Instrumentation::ActionViewEvent

Inherits:
Object
  • Object
show all
Defined in:
lib/new_relic/agent/instrumentation/action_view_subscriber.rb

Overview

This class holds state information between calls to ‘start` and `finish` for ActiveSupport events that we do not want to track as a transaction or segment.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, identifier) ⇒ ActionViewEvent

Returns a new instance of ActionViewEvent.



95
96
97
98
99
# File 'lib/new_relic/agent/instrumentation/action_view_subscriber.rb', line 95

def initialize(name, identifier)
  @name = name
  @identifier = identifier
  @finishable = nil
end

Instance Attribute Details

#finishableObject

Returns the value of attribute finishable.



93
94
95
# File 'lib/new_relic/agent/instrumentation/action_view_subscriber.rb', line 93

def finishable
  @finishable
end

#identifierObject (readonly)

Returns the value of attribute identifier.



92
93
94
# File 'lib/new_relic/agent/instrumentation/action_view_subscriber.rb', line 92

def identifier
  @identifier
end

#nameObject (readonly)

Returns the value of attribute name.



92
93
94
# File 'lib/new_relic/agent/instrumentation/action_view_subscriber.rb', line 92

def name
  @name
end

Instance Method Details

#finishObject



101
102
103
# File 'lib/new_relic/agent/instrumentation/action_view_subscriber.rb', line 101

def finish
  @finishable&.finish
end

#notice_error(error) ⇒ Object



105
106
107
# File 'lib/new_relic/agent/instrumentation/action_view_subscriber.rb', line 105

def notice_error(error)
  @finishable&.notice_error(error)
end