Actions
Feature #15863
closedLog request IDs (tagged logging) in production.log
Difficulty:
Triaged:
Bugzilla link:
Pull request:
Description
Request IDs can be added to Foreman's logs to make it easier to trace all log messages relating to a particular request when they interleave from multiple server processes.
Rails stores an ID in the request environment by default, and since Rails 5, the default configuration is to log it. The request ID is derived from the X-Request-ID header, otherwise a random UUID. Since Foreman uses the logging gem without tagging support instead of the default Rails logger, implementing this requires passing the extra information to its MDC/NDC (context) storage.
Actions