diff --git a/ddtrace/tracer.py b/ddtrace/tracer.py index ce5088137d6..55f0c7fbd5e 100644 --- a/ddtrace/tracer.py +++ b/ddtrace/tracer.py @@ -387,7 +387,8 @@ def current_root_span(self): # get the root span root_span = tracer.current_root_span() # set the host just once on the root span - root_span.set_tag('host', '127.0.0.1') + if root_span: + root_span.set_tag('host', '127.0.0.1') """ ctx = self.get_call_context() if ctx: