diff --git a/lib/datadog/tracing/trace_operation.rb b/lib/datadog/tracing/trace_operation.rb index b7097bfede6..ac820d2ecf1 100644 --- a/lib/datadog/tracing/trace_operation.rb +++ b/lib/datadog/tracing/trace_operation.rb @@ -291,7 +291,7 @@ def to_digest span_id = @active_span && @active_span.id span_id ||= @parent_span_id unless finished? # sample the trace_operation with the tracer - tracer.sample_trace(self) if @sampled.nil? + tracer.sample_trace(self) unless sampled? TraceDigest.new( span_id: span_id,