diff --git a/config/initializers/lograge.rb b/config/initializers/lograge.rb index 6a66ef5b9..f0a191495 100644 --- a/config/initializers/lograge.rb +++ b/config/initializers/lograge.rb @@ -6,6 +6,7 @@ Rails.application.configure do # injected by ansible. if !config.lograge.custom_options config.lograge.custom_options = lambda do |event| + exception_object = event.payload[:exception_object] { type: 'tps', user_id: event.payload[:user_id], @@ -14,7 +15,8 @@ Rails.application.configure do user_agent: event.payload[:user_agent], browser: event.payload[:browser], browser_version: event.payload[:browser_version], - platform: event.payload[:platform] + platform: event.payload[:platform], + backtrace: exception_object ? exception_object.backtrace.join("\n") : nil }.compact end