mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-02-09 13:37:12 +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")
|
buf.WriteString(", a root span")
|
||||||
} else {
|
} else {
|
||||||
buf.WriteString(" <")
|
buf.WriteString(" <")
|
||||||
if data.Parent.HasSpanID() {
|
f(false)(parentSpanIDKey.String(data.Parent.SpanIDString()))
|
||||||
f(false)(parentSpanIDKey.String(data.SpanContext.SpanIDString()))
|
|
||||||
}
|
|
||||||
if data.ParentAttributes != nil {
|
if data.ParentAttributes != nil {
|
||||||
data.ParentAttributes.Foreach(f(false))
|
data.ParentAttributes.Foreach(f(false))
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user