Skip to content

Commit

Permalink
Test:Fix minor test warning
Browse files Browse the repository at this point in the history
  • Loading branch information
marcotc committed Aug 17, 2023
1 parent 0e7da21 commit c4f1ed9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/datadog/tracing/contrib/support/tracer_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def spans
# Retrieves all traces in the current tracer instance.
# This method does not cache its results.
def fetch_traces(tracer = self.tracer)
tracer.instance_variable_get(:@traces) || []
(tracer.instance_variable_defined?(:@traces) && tracer.instance_variable_get(:@traces)) || []
end

# Retrieves and sorts all spans in the current tracer instance.
Expand Down

0 comments on commit c4f1ed9

Please sign in to comment.