Why we need a root span?
cuihaikuo opened this issue · 1 comments
cuihaikuo commented
When build a request and call TraceRequest(), two spans will be recorded, a root span and a child span, so why we use two spans to trace one request?
tonglil commented
FWIW, this is what I see in Datadog, an empty HTTP_CLIENT
root span that's not necessary:
Based on the code, I don't see where a root span could have been set other than in Tracer.start(req)
Line 222 in 8a6ff1a
and AFAICT
start
only gets called onceLine 173 in 8a6ff1a
Was Tracer
suppose to be initiated with a root span somehow but got missed
Line 131 in 8a6ff1a
Like:
ht := &Tracer{tr: tr, opts: opts, root: opentracing.SpanFromContext(req.Context())}
?