libp2p/go-libp2p-kad-dht

runLookupWithFollowup has a trace with invalid utf-8 attribute

MichaelMure opened this issue · 0 comments

... and that make OpenTelemetry (in particular the GRCP exporter) unhappy:

traces export: rpc error: code = Internal desc = grpc: error while marshaling: string field contains invalid UTF-8

Tracking that down, I found that runLookupWithFollowup add a target attribute as string: https://github.com/libp2p/go-libp2p-kad-dht/blob/master/query.go#L84

However, that target is a DHT key (binary) cast here as a string. It's not valid utf-8.

A simple fix would be to b58 encode that value again.