git » gofer » commit 41398a4

http: Use the existing trace for handling proxy requests

author Alberto Bertogli
2020-06-06 16:47:37 UTC
committer Alberto Bertogli
2020-06-06 16:49:35 UTC
parent 0e78a532405ad7dd6fb8b1a076918f0f8cc6dae1

http: Use the existing trace for handling proxy requests

server/http.go +0 -9

diff --git a/server/http.go b/server/http.go
index 1949a28..b4e8afd 100644
--- a/server/http.go
+++ b/server/http.go
@@ -367,15 +367,6 @@ func newReverseProxy(rp *httputil.ReverseProxy) http.Handler {
 }
 
 func (p *reverseProxy) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
-	tr := trace.New("http:proxy", req.Host+req.URL.String())
-	defer tr.Finish()
-
-	tr.Printf("%s %s %s %s %s",
-		req.RemoteAddr, req.Proto, req.Method, req.Host, req.URL.String())
-
-	// Associate the trace with this request.
-	req = req.WithContext(trace.NewContext(req.Context(), tr))
-
 	p.rp.ServeHTTP(rw, req)
 }