Add the trace id to the logs of erroneous requests at the middleware level #501

Closed
opened 2024-09-26 10:05:45 +00:00 by r.loginov · 0 comments
Member

At the moment, with tracing enabled, there may be situations when the query log that failed will not contain the trace id.
For example, when requesting the deletion of a non-empty bucket, we will get an error and the trace id will be in the logs. But for example, when requesting to upload an object to a non-existent bucket, we will not have a trace id in the logs (this is due to the fact that an error occurs in middlware at the access rights verification stage, and the trace id is roughly added to the request logs if it has already passed middleware).

Describe the solution you'd like

I suggest adding a trace id in the log of requests that end with errors at the middleware level. Suggestions and comments are welcome.

## Is your feature request related to a problem? Please describe. At the moment, with tracing enabled, there may be situations when the query log that failed will not contain the trace id. For example, when requesting the deletion of a non-empty bucket, we will get an error and the trace id will be in the logs. But for example, when requesting to upload an object to a non-existent bucket, we will not have a trace id in the logs (this is due to the fact that an error occurs in middlware at the access rights verification stage, and the trace id is roughly added to the request logs if it has already passed middleware). ## Describe the solution you'd like I suggest adding a trace id in the log of requests that end with errors at the middleware level. Suggestions and comments are welcome.
r.loginov added the
discussion
label 2024-09-26 10:05:45 +00:00
r.loginov self-assigned this 2024-10-21 12:27:12 +00:00
alexvanin added this to the v0.31.0 milestone 2024-11-20 12:14:07 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-s3-gw#501
No description provided.