mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
swarm/api/http: remove opentracing
This commit is contained in:
parent
07b10926f5
commit
73364460cd
1 changed files with 2 additions and 6 deletions
|
|
@ -11,8 +11,7 @@ import (
|
||||||
"github.com/ethereum/go-ethereum/swarm/api"
|
"github.com/ethereum/go-ethereum/swarm/api"
|
||||||
"github.com/ethereum/go-ethereum/swarm/log"
|
"github.com/ethereum/go-ethereum/swarm/log"
|
||||||
"github.com/ethereum/go-ethereum/swarm/sctx"
|
"github.com/ethereum/go-ethereum/swarm/sctx"
|
||||||
opentracing "github.com/opentracing/opentracing-go"
|
"github.com/ethereum/go-ethereum/swarm/spancontext"
|
||||||
"github.com/opentracing/opentracing-go/ext"
|
|
||||||
"github.com/pborman/uuid"
|
"github.com/pborman/uuid"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -95,10 +94,7 @@ func InstrumentOpenTracing(h http.Handler) http.Handler {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
spanName := fmt.Sprintf("http.%s.%s", r.Method, uri.Scheme)
|
spanName := fmt.Sprintf("http.%s.%s", r.Method, uri.Scheme)
|
||||||
wireContext, _ := opentracing.GlobalTracer().Extract(
|
ctx, sp := spancontext.StartSpan(r.Context(), spanName)
|
||||||
opentracing.HTTPHeaders,
|
|
||||||
opentracing.HTTPHeadersCarrier(r.Header))
|
|
||||||
sp, ctx := opentracing.StartSpanFromContext(r.Context(), spanName, ext.RPCServerOption(wireContext))
|
|
||||||
|
|
||||||
defer sp.Finish()
|
defer sp.Finish()
|
||||||
h.ServeHTTP(w, r.WithContext(ctx))
|
h.ServeHTTP(w, r.WithContext(ctx))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue