From b751f27e5dadf037003fe103bf170d6eef99154c Mon Sep 17 00:00:00 2001 From: Lucas Di Pentima Date: Fri, 16 Sep 2016 14:59:12 -0300 Subject: [PATCH] 10029: Added client_session_id to Workbench's client request log. --- apps/workbench/config/initializers/lograge.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/workbench/config/initializers/lograge.rb b/apps/workbench/config/initializers/lograge.rb index 24252c8aa7..6d3d246d8f 100644 --- a/apps/workbench/config/initializers/lograge.rb +++ b/apps/workbench/config/initializers/lograge.rb @@ -3,7 +3,8 @@ ArvadosWorkbench::Application.configure do config.lograge.formatter = Lograge::Formatters::Logstash.new config.lograge.custom_options = lambda do |event| exceptions = %w(controller action format id) - params = event.payload[:params].except(*exceptions) + params = {client_session_id: Thread.current[:client_session_id]}. + merge(event.payload[:params].except(*exceptions)) params_s = Oj.dump(params) if params_s.length > 1000 { params_truncated: params_s[0..1000] + "[...]" } -- 2.30.2