add test spans

This commit is contained in:
A.Unger
2021-08-06 15:47:46 +02:00
parent 33b1524f15
commit 2bdd07e41b
9 changed files with 83 additions and 22 deletions

View File

@@ -178,7 +178,7 @@ func loadMiddlewares(ctx context.Context, l log.Logger, cfg *config.Config) alic
return alice.New(
// first make sure we log all requests and redirect to https if necessary
pkgmiddleware.Trace,
pkgmiddleware.TraceContext,
pkgmiddleware.RealIP,
pkgmiddleware.RequestID,
middleware.AccessLog(l),

View File

@@ -226,6 +226,7 @@ func (p *MultiHostReverseProxy) ServeHTTP(w http.ResponseWriter, r *http.Request
defer span.End()
proxytracing.Propagator.Inject(ctx, propagation.HeaderCarrier(r.Header))
}
p.ReverseProxy.ServeHTTP(w, r.WithContext(ctx))
}