Geo: Add correlation ID to Geo::RequestService requests
What / Why
Because GitLab Geo is composed of multiple services (at least one primary and one secondary site), relevant logs need to have a common identifier to allow debugging across services.
Proposal
Add correlation ID propagation to Geo requests from secondary to primary sites. When a request originates on a Geo secondary (e.g., git clone via HTTP, web UI requests, API calls), the same correlation ID should be forwarded to the primary site, enabling end-to-end request tracing across Geo sites.
Implementation
Propagate the correlation ID from secondary to primary by:
- Workhorse: Forward the correlation ID via
X-Request-IDheader when proxying Geo requests to the primary. - Rails: Include the correlation ID in
Geo::BaseRequestheaders for allGeo::RequestServicerequests. - Documentation: Add setup and troubleshooting instructions for configuring correlation ID propagation across Geo sites (including the -propagateCorrelationID flag requirement on the primary).
Note: The primary site's Workhorse requires the -propagateCorrelationID flag to accept incoming correlation IDs.
Edited by Victor Prêté