Update Workhorse to log X-Gitaly-Correlation-Id to Kibana
Context
GitLab Runner now sets the X-Gitaly-Correlation-Id header on all Git HTTP requests to enable end-to-end tracing of Git operations across the distributed system. However, Workhorse currently doesn't log this correlation ID, making it difficult to trace Git operations from Runner through Workhorse to Gitaly when debugging performance issues or failures.
This addresses the logging requirement from gitlab-org/quality/analytics/team#267 (closed) to enable complete Git operation traceability.
What does this MR do?
- Adds extraction of
X-Gitaly-Correlation-Idheader from incoming Git HTTP requests - Includes the correlation ID in the
git_trafficlog entries sent to Kibana - Defines the header name as a constant for consistency
- Only logs the correlation ID when the header is present (non-empty)
This enables operators to:
- Find the correlation ID in Runner job logs
- Search Workhorse Kibana logs using that correlation ID
- Discover all related Workhorse X-Request-IDs for the Git operation
- Trace the complete request flow through to Gitaly
References
Contributes to Eliminate Git-Related Infrastructure Failures i... (gitlab-org/quality/analytics/team#129 - closed)
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.