提交 49e6d0a9 编写于 作者: R Rafael França

Merge pull request #24115 from garethson/instrumentation-headers

Pass headers through to payload for logging.
......@@ -19,6 +19,7 @@ def process_action(*args)
:controller => self.class.name,
:action => self.action_name,
:params => request.filtered_parameters,
:headers => request.headers,
:format => request.format.ref,
:method => request.request_method,
:path => request.fullpath
......
......@@ -183,6 +183,12 @@ def test_append_info_to_payload_is_called_even_with_exception
assert_equal "test_value", @controller.last_payload[:test_key]
end
def test_process_action_headers
get :show
wait
assert_equal "Rails Testing", @controller.last_payload[:headers]['User-Agent']
end
def test_process_action_with_filter_parameters
@request.env["action_dispatch.parameter_filter"] = [:lifo, :amount]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册