lib/ddtrace/contrib/active_support/notifications/event.rb in ls-trace-0.1.2 vs lib/ddtrace/contrib/active_support/notifications/event.rb in ls-trace-0.2.0
- old
+ new
@@ -16,10 +16,12 @@
end
# Redefines some class behaviors for a Subscriber to make
# it a bit simpler for an Event.
module ClassMethods
+ DEFAULT_TRACER = -> { Datadog.tracer }
+
def subscribe!
super
end
def subscription(span_name = nil, options = nil, tracer = nil)
@@ -50,10 +52,10 @@
def span_options
{}
end
def tracer
- Datadog.tracer
+ DEFAULT_TRACER
end
end
end
end
end