Skip to content

Commit 5540a13

Browse files
author
Tanner Bruce
committed
Add get_tracer and get_Current_span to __init__
1 parent c96b899 commit 5540a13

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

django_opentracing/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
from .middleware import OpenTracingMiddleware
2-
from .tracer import DjangoTracer
2+
from .tracer import DjangoTracer, get_current_span, get_tracer

django_opentracing/tracer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def get_tracer():
99
def get_current_span(request):
1010
# this lets django rest framework work seamlessly since they wrap the request
1111
if hasattr(request, '_request'):
12-
request = _request
12+
request = request._request
1313
return django_tracer.get_span(request)
1414

1515

0 commit comments

Comments
 (0)