Skip to content

Commit 754f452

Browse files
LexLuthrLexLuthr
andauthored
fix peer ID string (#8)
Co-authored-by: LexLuthr <lexluthr@protocol.ai>
1 parent 8f40f51 commit 754f452

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

impl/graphsync.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
logging "github.com/ipfs/go-log/v2"
99
"github.com/ipfs/go-peertaskqueue"
10-
ipld "github.com/ipld/go-ipld-prime"
10+
"github.com/ipld/go-ipld-prime"
1111
"github.com/libp2p/go-libp2p/core/peer"
1212
"go.opentelemetry.io/otel"
1313
"go.opentelemetry.io/otel/attribute"
@@ -318,7 +318,7 @@ func (gs *GraphSync) Request(ctx context.Context, p peer.ID, root ipld.Link, sel
318318
extNames = append(extNames, string(ext.Name))
319319
}
320320
ctx, _ = otel.Tracer("graphsync").Start(ctx, "request", trace.WithAttributes(
321-
attribute.String("peerID", p.Pretty()),
321+
attribute.String("peerID", p.String()),
322322
attribute.String("root", root.String()),
323323
attribute.StringSlice("extensions", extNames),
324324
))

requestmanager/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ func (rm *RequestManager) processResponses(p peer.ID,
289289
requestIds = append(requestIds, r.RequestID().String())
290290
}
291291
ctx, span := otel.Tracer("graphsync").Start(rm.ctx, "processResponses", trace.WithAttributes(
292-
attribute.String("peerID", p.Pretty()),
292+
attribute.String("peerID", p.String()),
293293
attribute.StringSlice("requestIDs", requestIds),
294294
attribute.Int("blockCount", len(blks)),
295295
))

responsemanager/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ func (rm *ResponseManager) processRequests(p peer.ID, requests []gsmsg.GraphSync
184184
ctx, messageSpan := otel.Tracer("graphsync").Start(
185185
rm.ctx,
186186
"processRequests",
187-
trace.WithAttributes(attribute.String("peerID", p.Pretty())),
187+
trace.WithAttributes(attribute.String("peerID", p.String())),
188188
)
189189
defer messageSpan.End()
190190

0 commit comments

Comments
 (0)