apply tracing middleware only when tracing is enabled

This commit is contained in:
A.Unger
2020-03-06 17:25:18 +01:00
committed by Ilja Neumann
parent 28b9da028a
commit 8324842805
+3 -1
View File
@@ -74,9 +74,11 @@ func Server(opts ...Option) (http.Service, error) {
)
{
if options.Config.Tracing.Enabled {
handle = svc.NewTracing(handle)
}
handle = svc.NewInstrument(handle, options.Metrics)
handle = svc.NewLogging(handle, options.Logger)
handle = svc.NewTracing(handle)
}
service.Handle(