Loading
requestinfohandler: Log caller_id from request metadata
What does this MR do and why?
Rails forwards caller_id in gRPC metadata, but Gitaly did not read or log it. During incident INC-13016, responders could not attribute Gitaly traffic to a caller. They could not tell whether elevated traffic came from crawlers, background jobs, or real users.
This reads caller_id from the request metadata and adds it to the request log tags, next to the existing remote_ip, user_id, and username fields. It is a log field only, not a Prometheus label, so there is no metric cardinality risk.
For GraphQL requests the value becomes more useful once gitlab!250311 (merged) lands, which sets caller_id to the operation, for example graphql:getProjects.
Related
- Rails side that sends the field: gitlab!250312 (merged)
- Corrective action: gitlab#614721
Edited by Stan Hu