Class: NewRelic::Agent::Instrumentation::Praxis::ActionEvent
- Inherits:
-
Event
- Object
- Event
- NewRelic::Agent::Instrumentation::Praxis::ActionEvent
- Defined in:
- lib/newrelic-praxis/praxis/action_event.rb
Instance Attribute Summary collapse
-
#controller ⇒ Object
readonly
Returns the value of attribute controller.
-
#parent ⇒ Object
Returns the value of attribute parent.
-
#queue_start ⇒ Object
readonly
Returns the value of attribute queue_start.
-
#request ⇒ Object
readonly
Returns the value of attribute request.
Instance Method Summary collapse
- #_is_filtered?(key) ⇒ Boolean
- #apdex_ignored? ⇒ Boolean
-
#enduser_ignored? ⇒ Boolean
hardcoded to true for Praxis, as it makes no sense for APIs.
- #ignored? ⇒ Boolean
-
#initialize(name, start, ending, transaction_id, payload, request) ⇒ ActionEvent
constructor
A new instance of ActionEvent.
- #metric_action ⇒ Object
- #metric_name ⇒ Object
Constructor Details
#initialize(name, start, ending, transaction_id, payload, request) ⇒ ActionEvent
Returns a new instance of ActionEvent.
8 9 10 11 12 13 14 15 16 |
# File 'lib/newrelic-praxis/praxis/action_event.rb', line 8 def initialize(name, start, ending, transaction_id, payload, request) # We have a different initialize parameter list, so be explicit super(name, start, ending, transaction_id, payload) @controller = payload[:controller] @request = controller.request @queue_start = QueueTime.(request.env, self.time) end |
Instance Attribute Details
#controller ⇒ Object (readonly)
Returns the value of attribute controller.
6 7 8 |
# File 'lib/newrelic-praxis/praxis/action_event.rb', line 6 def controller @controller end |
#parent ⇒ Object
Returns the value of attribute parent.
5 6 7 |
# File 'lib/newrelic-praxis/praxis/action_event.rb', line 5 def parent @parent end |
#queue_start ⇒ Object (readonly)
Returns the value of attribute queue_start.
6 7 8 |
# File 'lib/newrelic-praxis/praxis/action_event.rb', line 6 def queue_start @queue_start end |
#request ⇒ Object (readonly)
Returns the value of attribute request.
6 7 8 |
# File 'lib/newrelic-praxis/praxis/action_event.rb', line 6 def request @request end |
Instance Method Details
#_is_filtered?(key) ⇒ Boolean
39 40 41 42 43 44 |
# File 'lib/newrelic-praxis/praxis/action_event.rb', line 39 def _is_filtered?(key) IgnoreActions.is_filtered?( key, self.controller.class, self.metric_action) end |
#apdex_ignored? ⇒ Boolean
30 31 32 |
# File 'lib/newrelic-praxis/praxis/action_event.rb', line 30 def apdex_ignored? _is_filtered?(ControllerInstrumentation::NR_IGNORE_APDEX_KEY) end |
#enduser_ignored? ⇒ Boolean
hardcoded to true for Praxis, as it makes no sense for APIs
35 36 37 |
# File 'lib/newrelic-praxis/praxis/action_event.rb', line 35 def enduser_ignored? true end |
#ignored? ⇒ Boolean
26 27 28 |
# File 'lib/newrelic-praxis/praxis/action_event.rb', line 26 def ignored? _is_filtered?(ControllerInstrumentation::NR_DO_NOT_TRACE_KEY) end |
#metric_action ⇒ Object
18 19 20 |
# File 'lib/newrelic-praxis/praxis/action_event.rb', line 18 def metric_action self.request.action.name end |
#metric_name ⇒ Object
22 23 24 |
# File 'lib/newrelic-praxis/praxis/action_event.rb', line 22 def metric_name "Controller/#{controller.class.name}/#{metric_action}" end |