Skip to content

Commit

Permalink
Merge pull request #355 from alphagov/log_govuk_request_id
Browse files Browse the repository at this point in the history
Log GOVUK-Request-Id header
  • Loading branch information
dhwthompson committed Jan 8, 2014
2 parents 0945953 + acfb44a commit f14503e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion config/initializers/logstasher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
LogStasher.add_custom_fields do |fields|
# Mirrors Nginx request logging, e.g GET /path/here HTTP/1.1
fields[:request] = "#{request.request_method} #{request.fullpath} #{request.headers['SERVER_PROTOCOL']}"
# Pass X-Varnish to logging
# Pass the request id to logging
fields[:govuk_request_id] = request.headers['GOVUK-Request-Id']
fields[:varnish_id] = request.headers['X-Varnish']
end
end

0 comments on commit f14503e

Please sign in to comment.