mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-02-03 13:11:53 +02:00
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:
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))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user