-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Labels
Description
Hi!
I would be nice to be able to add a correlation-id per request to all logs including the ones created in ServeHTTP method. Currently errors returned from an endpoint will not have any correlation-id:
response, err := s.e(ctx, request)
if err != nil {
s.logger.Log("err", err)
s.errorEncoder(ctx, err, w)
return
}
It could just be the request-id from the context. I don't see how it's possible to add it in these cases. If it can be done, I would appreciate, if you would let me know.
Reactions are currently unavailable