You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, sorry for a noob question. From what I understand, the x-request-id header is use to correlate request with server log.
Now the RequestID middleware already use the x-request-id header from client if one is sent, so I assume the RequestID here is the same as x-request-id.
My problem is when the client is not send the header to the server,
the server generate one id but the client has no info on the newly generated id, how will I know which request is correlate to which log?
Now what I usually like do is I make another middleware to handle the header setting and use it after the RequestID middleware.
It make more sense to do it this way or, would it be better if the RequestID middleware do this?
Or maybe I completely misunderstand the purpose of this middleware?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
First of all, sorry for a noob question. From what I understand, the x-request-id header is use to correlate request with server log.
Now the RequestID middleware already use the x-request-id header from client if one is sent, so I assume the RequestID here is the same as x-request-id.
My problem is when the client is not send the header to the server,
the server generate one id but the client has no info on the newly generated id, how will I know which request is correlate to which log?
Now what I usually like do is I make another middleware to handle the header setting and use it after the RequestID middleware.
It make more sense to do it this way or, would it be better if the RequestID middleware do this?
Or maybe I completely misunderstand the purpose of this middleware?
Beta Was this translation helpful? Give feedback.
All reactions