|
|
@ -101,10 +101,12 @@ func Client(l log.Logger) middleware.Middleware { |
|
|
|
var ( |
|
|
|
var ( |
|
|
|
path string |
|
|
|
path string |
|
|
|
method string |
|
|
|
method string |
|
|
|
component string |
|
|
|
|
|
|
|
args string |
|
|
|
args string |
|
|
|
|
|
|
|
component string |
|
|
|
query string |
|
|
|
query string |
|
|
|
|
|
|
|
traceID string |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
traceID = trace.SpanContextFromContext(ctx).TraceID().String() |
|
|
|
if info, ok := http.FromClientContext(ctx); ok { |
|
|
|
if info, ok := http.FromClientContext(ctx); ok { |
|
|
|
component = "HTTP" |
|
|
|
component = "HTTP" |
|
|
|
path = info.Request.URL.Path |
|
|
|
path = info.Request.URL.Path |
|
|
@ -123,6 +125,7 @@ func Client(l log.Logger) middleware.Middleware { |
|
|
|
logger.Errorw( |
|
|
|
logger.Errorw( |
|
|
|
"kind", "client", |
|
|
|
"kind", "client", |
|
|
|
"component", component, |
|
|
|
"component", component, |
|
|
|
|
|
|
|
"traceID", traceID, |
|
|
|
"path", path, |
|
|
|
"path", path, |
|
|
|
"method", method, |
|
|
|
"method", method, |
|
|
|
"args", args, |
|
|
|
"args", args, |
|
|
@ -135,6 +138,7 @@ func Client(l log.Logger) middleware.Middleware { |
|
|
|
logger.Infow( |
|
|
|
logger.Infow( |
|
|
|
"kind", "client", |
|
|
|
"kind", "client", |
|
|
|
"component", component, |
|
|
|
"component", component, |
|
|
|
|
|
|
|
"traceID", traceID, |
|
|
|
"path", path, |
|
|
|
"path", path, |
|
|
|
"method", method, |
|
|
|
"method", method, |
|
|
|
"args", args, |
|
|
|
"args", args, |
|
|
@ -146,6 +150,7 @@ func Client(l log.Logger) middleware.Middleware { |
|
|
|
logger.Errorw( |
|
|
|
logger.Errorw( |
|
|
|
"kind", "client", |
|
|
|
"kind", "client", |
|
|
|
"component", component, |
|
|
|
"component", component, |
|
|
|
|
|
|
|
"traceID", traceID, |
|
|
|
"path", path, |
|
|
|
"path", path, |
|
|
|
"method", method, |
|
|
|
"method", method, |
|
|
|
"args", args, |
|
|
|
"args", args, |
|
|
@ -157,6 +162,7 @@ func Client(l log.Logger) middleware.Middleware { |
|
|
|
logger.Infow( |
|
|
|
logger.Infow( |
|
|
|
"kind", "client", |
|
|
|
"kind", "client", |
|
|
|
"component", component, |
|
|
|
"component", component, |
|
|
|
|
|
|
|
"traceID", traceID, |
|
|
|
"path", path, |
|
|
|
"path", path, |
|
|
|
"method", method, |
|
|
|
"method", method, |
|
|
|
"args", args, |
|
|
|
"args", args, |
|
|
|