Module: Datadog::Tracing::Contrib::ActionView::Event::ClassMethods

Defined in:
lib/datadog/tracing/contrib/action_view/event.rb

Overview

Class methods for ActionView events.

Instance Method Summary collapse

Instance Method Details

#configurationObject



18
19
20
# File 'lib/datadog/tracing/contrib/action_view/event.rb', line 18

def configuration
  Datadog.configuration.tracing[:action_view]
end

#record_exception(span, payload) ⇒ Object



22
23
24
25
26
27
28
29
# File 'lib/datadog/tracing/contrib/action_view/event.rb', line 22

def record_exception(span, payload)
  if payload[:exception_object]
    span.set_error(payload[:exception_object])
  elsif payload[:exception]
    # Fallback for ActiveSupport < 5.0
    span.set_error(payload[:exception])
  end
end