Thread job request correlation ID to git operations
What does this MR do?
This MR adds support for Gitaly correlation IDs in GitLab Runner to enable end-to-end tracing of Git operations through GitLab's distributed system.
Changes:
- Adds new feature flag
FF_USE_GITALY_CORRELATION_ID
(enabled by default) - When enabled, injects
X-Gitaly-Correlation-ID
header into all Git HTTP operations viahttp.extraHeader
configuration
Why was this MR needed?
Currently, it's difficult to trace Git operations (clone, fetch, push) through GitLab's distributed infrastructure when debugging performance issues or failures. GitLab Runner makes Git requests that flow through multiple services (Workhorse, Rails, Gitaly), but there's no way to correlate these requests across service boundaries.
This MR solves the problem by:
- Enabling tracing of slow Git clones/fetches through Gitaly logs
- Helping debug failed Git operations by correlating logs across services
- Improving observability for Git-related performance issues
- Providing unique request identification for each job's Git operations
What's the best way to test this MR?
N/A
What are the relevant issue numbers?
gitlab-org/quality/analytics/team#148
Edited by Arran Walker