The header in HTTP requests that identifies the request can be configured with config.action_dispatch.request_id_header. When hosting a web application that uses an AWS load balancer, it adds the X-Amzn-Trace-Id header as the request id. However, the ID appears in the format of
Root=1-67891233-abcdef012345678912345678
ActionDispatch::RequestId
sanitizes this ID and ends up removing the =
character. This means that as a request flows through different parts of the system, they can’t be correlated.
Would it make sense to add =
to the regex? I note that a previous PR did something similar to better support Apache. If so, I would be happy to submit a pull request.