diff --git a/spec/ddtrace/tracer_integration_spec.rb b/spec/ddtrace/tracer_integration_spec.rb index d70e7b9690d..7057ccf201f 100644 --- a/spec/ddtrace/tracer_integration_spec.rb +++ b/spec/ddtrace/tracer_integration_spec.rb @@ -9,6 +9,10 @@ subject(:tracer) { described_class.new(writer: FauxWriter.new) } let(:spans) { tracer.writer.spans(:keep) } + after do + tracer.shutdown! # Ensure no state gets left behind + end + def sampling_priority_metric(span) span.get_metric(Datadog::Ext::DistributedTracing::SAMPLING_PRIORITY_KEY) end