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/log"
|
||||
"github.com/ethereum/go-ethereum/swarm/sctx"
|
||||
opentracing "github.com/opentracing/opentracing-go"
|
||||
"github.com/opentracing/opentracing-go/ext"
|
||||
"github.com/ethereum/go-ethereum/swarm/spancontext"
|
||||
"github.com/pborman/uuid"
|
||||
)
|
||||
|
||||
|
|
@ -95,10 +94,7 @@ func InstrumentOpenTracing(h http.Handler) http.Handler {
|
|||
return
|
||||
}
|
||||
spanName := fmt.Sprintf("http.%s.%s", r.Method, uri.Scheme)
|
||||
wireContext, _ := opentracing.GlobalTracer().Extract(
|
||||
opentracing.HTTPHeaders,
|
||||
opentracing.HTTPHeadersCarrier(r.Header))
|
||||
sp, ctx := opentracing.StartSpanFromContext(r.Context(), spanName, ext.RPCServerOption(wireContext))
|
||||
ctx, sp := spancontext.StartSpan(r.Context(), spanName)
|
||||
|
||||
defer sp.Finish()
|
||||
h.ServeHTTP(w, r.WithContext(ctx))
|
||||
|
|
|
|||
Loading…
Reference in a new issue