From f8192778cd5ca2fae8e2912747943e7a0adccd12 Mon Sep 17 00:00:00 2001 From: Jonathan Hooper Date: Thu, 15 Feb 2018 15:17:50 -0600 Subject: [PATCH] Add exception notification view for sidekiq data **Why**: By default, exception notification dumps everything it knows about a job in the email it sends. This often contains the data that was enqueued with the job. For our idv jobs, this data is PII. This commit uses a whitelist approach to cause exception notifier to only email us a backtrace and some metadata about the job. --- app/views/exception_notifier/_data.text.erb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 app/views/exception_notifier/_data.text.erb diff --git a/app/views/exception_notifier/_data.text.erb b/app/views/exception_notifier/_data.text.erb new file mode 100644 index 00000000000..1be593c38dc --- /dev/null +++ b/app/views/exception_notifier/_data.text.erb @@ -0,0 +1,11 @@ +<% job = @data[:sidekiq][:job] %> + +Job class: <%= job['wrapped'] %> +Queue: <%= job['queue'] %> +Retry: <%= job['retry'] %> +Error class: <%= job['error_class'] %> +Error message: <%= job['error_message'] %> +Created at: <%= Time.at(job['created_at']) %> +Enqueued at: <%= Time.at(job['enqueued_at']) %> +Failed at: <%= Time.at(job['failed_at']) %> +Retry count: <%= job['retry_count'] %>