delete trace

pull/1001/head
longXboy 4 years ago committed by longxboy
parent bf00542cb0
commit 6c70049d2f
  1. 4
      middleware/logging/logging.go

@ -12,8 +12,6 @@ import (
// Server is an server logging middleware. // Server is an server logging middleware.
func Server(logger log.Logger) middleware.Middleware { func Server(logger log.Logger) middleware.Middleware {
logger = log.With(logger, "trace_id", log.TraceID(), "span_id", log.SpanID())
return func(handler middleware.Handler) middleware.Handler { return func(handler middleware.Handler) middleware.Handler {
return func(ctx context.Context, req interface{}) (reply interface{}, err error) { return func(ctx context.Context, req interface{}) (reply interface{}, err error) {
reply, err = handler(ctx, req) reply, err = handler(ctx, req)
@ -32,8 +30,6 @@ func Server(logger log.Logger) middleware.Middleware {
// Client is an client logging middleware. // Client is an client logging middleware.
func Client(logger log.Logger) middleware.Middleware { func Client(logger log.Logger) middleware.Middleware {
logger = log.With(logger, "trace_id", log.TraceID(), "span_id", log.SpanID())
return func(handler middleware.Handler) middleware.Handler { return func(handler middleware.Handler) middleware.Handler {
return func(ctx context.Context, req interface{}) (reply interface{}, err error) { return func(ctx context.Context, req interface{}) (reply interface{}, err error) {
reply, err = handler(ctx, req) reply, err = handler(ctx, req)

Loading…
Cancel
Save