Sha256: c6878ca911094ffc25d7c9df349d9d4f3e8505aff16e321a5ba059b2a87c812b
Contents?: true
Size: 1.01 KB
Versions: 22
Compression:
Stored size: 1.01 KB
Contents
require 'ddtrace/contrib/active_support/notifications/event' module Datadog module Contrib module ActionView # Defines basic behavior for an ActionView event. module Event def self.included(base) base.send(:include, ActiveSupport::Notifications::Event) base.send(:extend, ClassMethods) end # Class methods for ActionView events. module ClassMethods def span_options { service: configuration[:service_name] } end def tracer -> { configuration[:tracer] } end def configuration Datadog.configuration[:action_view] end 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 end end end end end
Version data entries
22 entries across 22 versions & 2 rubygems