feature/501-add_trace_id_to_logs_of_erroneous_requests_at_middleware #525
No reviewers
Labels
No labels
P0
P1
P2
P3
good first issue
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-s3-gw#525
Loading…
Reference in a new issue
No description provided.
Delete branch "r.loginov/frostfs-s3-gw:feature/501-add_trace_id_to_logs_of_erroneous_requests_at_middleware"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
close #501
As part of this task, support was also made for using the request logger in the
logAndSendError
function. Based on this comment, it was planned to do so in the future. Thanks to this, we can not store the trace id inReqInfo
, but instead add it to the request logger once.Examples of log output for comparison:
before:
now:
before:
now:
before:
now:
50bb21210e
to6a00aa2269
Ideally, I would also like to display the trace id in the request start log. However, I will not be able to figure out how to do it in a beautiful way. We cannot move the tracing middleware before the request middleware, because the tracing uses the request id from ReqInfo, which in turn is formed in the request middleware. The only option that can be considered is to move the span initialization logic from tracing middleware to request middleware. However, it seems that this violates the SRP.
LGTM
I don't mind to move trace initialization into
Request
middleware6a00aa2269
to3357706e60
New commits pushed, approval review dismissed automatically according to repository settings