Fix parent span ID formatting (#103)

It was printing an ID of the created span instead. Also drop the if
clause checking if span has a parent span ID - we know at this point
that the condition is always true.
This commit is contained in:
Krzesimir Nowak
2019-08-22 22:18:31 -07:00
committed by rghetia
parent 3ca747f4e8
commit fafb3daf1e
@@ -54,9 +54,7 @@ func AppendEvent(buf *strings.Builder, data reader.Event) {
buf.WriteString(", a root span")
} else {
buf.WriteString(" <")
if data.Parent.HasSpanID() {
f(false)(parentSpanIDKey.String(data.SpanContext.SpanIDString()))
}
f(false)(parentSpanIDKey.String(data.Parent.SpanIDString()))
if data.ParentAttributes != nil {
data.ParentAttributes.Foreach(f(false))
}