lib/ddtrace/tracer.rb in ddtrace-0.19.0 vs lib/ddtrace/tracer.rb in ddtrace-0.19.1
- old
+ new
@@ -227,10 +227,10 @@
opts[:context] = ctx unless ctx.nil?
span = Span.new(self, name, opts)
if parent.nil?
# root span
- @sampler.sample(span)
+ @sampler.sample!(span)
span.set_tag('system.pid', Process.pid)
if ctx && ctx.trace_id && ctx.span_id
span.trace_id = ctx.trace_id
span.parent_id = ctx.span_id
end