lib/labkit/logging/grpc/server_interceptor.rb in gitlab-labkit-0.15.0 vs lib/labkit/logging/grpc/server_interceptor.rb in gitlab-labkit-0.16.0

- old
+ new

@@ -75,10 +75,13 @@ pid: Process.pid, correlation_id: Labkit::Correlation::CorrelationId.current_id.to_s, time: Time.now.utc.strftime("%Y-%m-%dT%H:%M:%S.%LZ"), ) - message["exception"] = ex.message if ex + if ex + message["exception"] = ex.message + message["exception_backtrace"] = ex.backtrace[0..5] if ex.backtrace + end @log_file.puts(JSON.dump(message)) end end end