Skip to content

Commit 38aef5f

Browse files
authored
Fix net peer attributes values in client spans (#8)
1 parent af84d3f commit 38aef5f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/tracegen/templated.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,9 @@ func (g *TemplatedGenerator) generateNetworkAttributes(tmpl *internalSpanTemplat
245245

246246
if parent != nil && parent.Kind() == ptrace.SpanKindClient {
247247
ip, _ := span.Attributes().Get("net.sock.host.addr")
248-
putIfNotExists(parent.Attributes(), "net.sock.peer.addr", ip)
248+
putIfNotExists(parent.Attributes(), "net.sock.peer.addr", ip.Str())
249249
name, _ := span.Attributes().Get("net.host.name")
250-
putIfNotExists(parent.Attributes(), "net.peer.name", name)
250+
putIfNotExists(parent.Attributes(), "net.peer.name", name.Str())
251251
}
252252
}
253253
}

0 commit comments

Comments
 (0)