middleware: add '-http' suffix to http trace family

This commit is contained in:
Cadey Ratio 2017-10-01 08:43:24 -07:00
parent c1f8899806
commit 7927c4d4f3
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.Host+r.RequestURI)
sp := trace.New(filepath.Base(os.Args[0]+"-http"), "http://"+r.Host+r.RequestURI)
defer sp.Finish()
ctx, cancel := context.WithTimeout(r.Context(), 30*time.Second)
defer cancel()