Skip to content

Commit

Permalink
providerQueryManager: Fix tracing
Browse files Browse the repository at this point in the history
  • Loading branch information
hsanjuan committed Nov 21, 2024
1 parent 4a3dc75 commit 9185719
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion routing/providerquerymanager/providerquerymanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
logging "github.com/ipfs/go-log/v2"
peer "github.com/libp2p/go-libp2p/core/peer"
swarm "github.com/libp2p/go-libp2p/p2p/net/swarm"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"
)
Expand Down Expand Up @@ -179,7 +180,7 @@ func (pqm *ProviderQueryManager) FindProvidersAsync(sessionCtx context.Context,
inProgressRequestChan := make(chan inProgressRequest)

var span trace.Span
sessionCtx, span = internal.StartSpan(sessionCtx, "ProviderQueryManager.FindProvidersAsync", trace.WithAttributes(attribute.Stringer("cid", k)))
sessionCtx, span = otel.Tracer("routing").Start(sessionCtx, "ProviderQueryManager.FindProvidersAsync", trace.WithAttributes(attribute.Stringer("cid", k)))

select {
case pqm.providerQueryMessages <- &newProvideQueryMessage{
Expand Down

0 comments on commit 9185719

Please sign in to comment.