Skip to content

Adds X-Request-Id response header for Workhorse

Andrew Newdigate requested to merge send-correlation-id-in-response-headers into master

Upstream merge request: labkit!8 (merged)

This change configures workhorse to set the Correlation-ID value in the response header. This is a common technique which allows errors to be traced more easily.

This can be done through several methods:

  1. Advanced users can review their browser headers and report the value
  2. Nginx error pages could be configured to report the correlation-id on the error page, allowing users to easily report it.
  3. Optionally, we could include direct links to Kibana, our tracing infrastructure or sentry, which, if the user has appropriate permissions (ie, they're a member of staff), the could access directly from the error page.

Once the correlation-id has been reported, support engineers or production staff can use this to further investigate issues using logging infrastructure, sentry or distributed tracing.

Example

$ curl --head localhost:8181
HTTP/1.1 502 Bad Gateway
Content-Type: text/plain
X-Request-Id: Atvop6glrx3
Date: Fri, 08 Feb 2019 08:53:28 GMT
Content-Length: 24

Note, the X-Request-ID header above. This correlation-id can be used to find further details of this request in Kibana, Sentry, Jaeger, etc

cc @jurbanc @jritchey for security visibility

cc @lyle for GitLab.com support team visibility

Edited by Andrew Newdigate

Merge request reports