Module: Datadog::Contrib::ActionView::Event::ClassMethods
- Defined in:
- lib/ddtrace/contrib/action_view/event.rb
Overview
Class methods for ActionView events.
Instance Method Summary collapse
- #configuration ⇒ Object
- #record_exception(span, payload) ⇒ Object
- #span_options ⇒ Object
- #tracer ⇒ Object
Instance Method Details
#configuration ⇒ Object
23 24 25 |
# File 'lib/ddtrace/contrib/action_view/event.rb', line 23 def configuration Datadog.configuration[:action_view] end |
#record_exception(span, payload) ⇒ Object
27 28 29 30 31 32 33 34 |
# File 'lib/ddtrace/contrib/action_view/event.rb', line 27 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 |
#span_options ⇒ Object
15 16 17 |
# File 'lib/ddtrace/contrib/action_view/event.rb', line 15 def { service: configuration[:service_name] } end |
#tracer ⇒ Object
19 20 21 |
# File 'lib/ddtrace/contrib/action_view/event.rb', line 19 def tracer -> { configuration[:tracer] } end |