Skip to content

Commit

Permalink
Find django spans in the stack
Browse files Browse the repository at this point in the history
  • Loading branch information
wiedi committed Feb 7, 2020
1 parent cc2c2b7 commit 321475c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions opentracing_utils/span.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ def inspect_span_from_stack(depth=100):
break

for k, v in frame.f_locals.items():
if isinstance(v, HttpRequest) and hasattr(v, "current_span"):
span = v.current_span
if isinstance(v, opentracing.Span):
span = v

Expand Down

0 comments on commit 321475c

Please sign in to comment.