lib/tracer_client/client.rb in tracer_client-0.1.5 vs lib/tracer_client/client.rb in tracer_client-0.2.1

- old
+ new

@@ -18,28 +18,30 @@ Thread.current[:tracer_params] = nil end def log(notice) + data = notice.merge(request_log_data) Thread.new do - Tracer::Server.log(notice.merge(request_log_data)) + Tracer::Server.log(data) end end def log_changes(changes) + data = changes.merge(request_changes_data) Thread.new do - Tracer::Server.log_changes(changes.merge(request_changes_data)) + Tracer::Server.log_changes(data) end end private def get_params(params) @parameter_filter ||= ActionDispatch::Http::ParameterFilter.new Rails.application.config.filter_parameters - @parameter_filter.filter(params.except(:utf8, :authenticity_token, :_method)).symbolize_keys + @parameter_filter.filter(params.except(:utf8, :authenticity_token, :_method)).to_unsafe_hash end def request_data data = {context: {}}