Skip to content

Commit

Permalink
fix peer ID string (#8)
Browse files Browse the repository at this point in the history
Co-authored-by: LexLuthr <[email protected]>
  • Loading branch information
LexLuthr and LexLuthr authored Mar 26, 2024
1 parent 8f40f51 commit 754f452
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions impl/graphsync.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

logging "github.com/ipfs/go-log/v2"
"github.com/ipfs/go-peertaskqueue"
ipld "github.com/ipld/go-ipld-prime"
"github.com/ipld/go-ipld-prime"
"github.com/libp2p/go-libp2p/core/peer"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
Expand Down Expand Up @@ -318,7 +318,7 @@ func (gs *GraphSync) Request(ctx context.Context, p peer.ID, root ipld.Link, sel
extNames = append(extNames, string(ext.Name))
}
ctx, _ = otel.Tracer("graphsync").Start(ctx, "request", trace.WithAttributes(
attribute.String("peerID", p.Pretty()),
attribute.String("peerID", p.String()),
attribute.String("root", root.String()),
attribute.StringSlice("extensions", extNames),
))
Expand Down
2 changes: 1 addition & 1 deletion requestmanager/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ func (rm *RequestManager) processResponses(p peer.ID,
requestIds = append(requestIds, r.RequestID().String())
}
ctx, span := otel.Tracer("graphsync").Start(rm.ctx, "processResponses", trace.WithAttributes(
attribute.String("peerID", p.Pretty()),
attribute.String("peerID", p.String()),
attribute.StringSlice("requestIDs", requestIds),
attribute.Int("blockCount", len(blks)),
))
Expand Down
2 changes: 1 addition & 1 deletion responsemanager/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ func (rm *ResponseManager) processRequests(p peer.ID, requests []gsmsg.GraphSync
ctx, messageSpan := otel.Tracer("graphsync").Start(
rm.ctx,
"processRequests",
trace.WithAttributes(attribute.String("peerID", p.Pretty())),
trace.WithAttributes(attribute.String("peerID", p.String())),
)
defer messageSpan.End()

Expand Down

0 comments on commit 754f452

Please sign in to comment.