OpenTracing instrumentation for [net/http]
implements http RoundTrip by NewTraceTracesport(rt http.RoundTripper, activeSpanKey string,peerService string, extraTags ...opentracing.Tag)
.
Example :
tracertan := httpinvoke.NewTraceTracesport(http.DefaultTransport,"","",opentracing.Tag{Key:"ab",Value:"b"})
client := &http.Client{
Transport:tracertan,
}
Example for rpcx :
tracertan := httpinvoke.NewTraceTracesport(http.DefaultTransport,share.OpentracingSpanServerKey,"",opentracing.Tag{Key:"ab",Value:"b"})
client := &http.Client{
Transport:tracertan,
}