middleware: trace: report as https

This commit is contained in:
Cadey Ratio 2017-10-01 11:24:18 -07:00
parent 5991cb7e69
commit 0319e6dd9f
No known key found for this signature in database
GPG Key ID: D607EE27C2E7F89A
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ import (
// Trace adds go stdlib tracing to this http handler.
func Trace(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
sp := trace.New(filepath.Base(os.Args[0]+"-http"), r.URL.Scheme+"://"+r.Host+r.RequestURI)
sp := trace.New(filepath.Base(os.Args[0]+"-https"), r.Host+r.RequestURI)
defer sp.Finish()
ctx, cancel := context.WithTimeout(r.Context(), 30*time.Second)
defer cancel()