From 054f8130a2b0a998637b2c9ff48e0b7935f87bcc Mon Sep 17 00:00:00 2001 From: Derek Fong <151783381+dfong-adh@users.noreply.github.com> Date: Thu, 19 Dec 2024 16:42:13 -0800 Subject: [PATCH] 99537: Remove silent_failure_avoided_no_confirmation from DR jobs --- .../failure_notification_email_job.rb | 12 ------------ app/sidekiq/decision_review/form4142_submit.rb | 10 +++------- app/sidekiq/decision_review/submit_upload.rb | 12 ++++-------- .../failure_notification_email_job.rb | 12 ------------ .../app/sidekiq/decision_reviews/form4142_submit.rb | 10 +++------- .../app/sidekiq/decision_reviews/submit_upload.rb | 12 ++++-------- .../spec/sidekiq/form4142_submit_spec.rb | 2 -- .../spec/sidekiq/submit_upload_spec.rb | 2 -- spec/sidekiq/decision_review/form4142_submit_spec.rb | 2 -- spec/sidekiq/decision_review/submit_upload_spec.rb | 2 -- 10 files changed, 14 insertions(+), 62 deletions(-) diff --git a/app/sidekiq/decision_review/failure_notification_email_job.rb b/app/sidekiq/decision_review/failure_notification_email_job.rb index 52101894362..1f53c992ad4 100644 --- a/app/sidekiq/decision_review/failure_notification_email_job.rb +++ b/app/sidekiq/decision_review/failure_notification_email_job.rb @@ -146,10 +146,6 @@ def record_form_email_send_successful(submission, notification_id) params = { submitted_appeal_uuid: submission.submitted_appeal_uuid, appeal_type:, notification_id: } Rails.logger.info('DecisionReview::FailureNotificationEmailJob form email queued', params) StatsD.increment("#{STATSD_KEY_PREFIX}.form.email_queued", tags: ["appeal_type:#{appeal_type}"]) - - tags = ["service:#{DecisionReviewV1::APPEAL_TYPE_TO_SERVICE_MAP[appeal_type]}", - 'function: form submission to Lighthouse'] - StatsD.increment('silent_failure_avoided_no_confirmation', tags:) end def record_form_email_send_failure(submission, e) @@ -172,10 +168,6 @@ def record_secondary_form_email_send_successful(secondary_form, notification_id) notification_id: } Rails.logger.info('DecisionReview::FailureNotificationEmailJob secondary form email queued', params) StatsD.increment("#{STATSD_KEY_PREFIX}.secondary_form.email_queued", tags: ["appeal_type:#{appeal_type}"]) - - tags = ["service:#{DecisionReviewV1::APPEAL_TYPE_TO_SERVICE_MAP[appeal_type]}", - 'function: secondary form submission to Lighthouse'] - StatsD.increment('silent_failure_avoided_no_confirmation', tags:) end def record_secondary_form_email_send_failure(secondary_form, e) @@ -204,10 +196,6 @@ def record_evidence_email_send_successful(upload, notification_id) } Rails.logger.info('DecisionReview::FailureNotificationEmailJob evidence email queued', params) StatsD.increment("#{STATSD_KEY_PREFIX}.evidence.email_queued", tags: ["appeal_type:#{appeal_type}"]) - - tags = ["service:#{DecisionReviewV1::APPEAL_TYPE_TO_SERVICE_MAP[appeal_type]}", - 'function: evidence submission to Lighthouse'] - StatsD.increment('silent_failure_avoided_no_confirmation', tags:) end def record_evidence_email_send_failure(upload, e) diff --git a/app/sidekiq/decision_review/form4142_submit.rb b/app/sidekiq/decision_review/form4142_submit.rb index a0404d07fdc..3a8bfb2834d 100644 --- a/app/sidekiq/decision_review/form4142_submit.rb +++ b/app/sidekiq/decision_review/form4142_submit.rb @@ -18,9 +18,6 @@ class Form4142Submit appeal_submission_id, _encrypted_payload, submitted_appeal_uuid = msg['args'] job_id = msg['jid'] - tags = ['service:supplemental-claims', 'function: secondary form submission to Lighthouse'] - StatsD.increment('silent_failure', tags:) - ::Rails.logger.error( { error_message:, @@ -98,10 +95,6 @@ def self.record_email_send_successful(submission, notification_id) notification_id: } Rails.logger.info('DecisionReview::Form4142Submit retries exhausted email queued', params) StatsD.increment("#{STATSD_KEY_PREFIX}.retries_exhausted.email_queued") - - tags = ["service:#{DecisionReviewV1::APPEAL_TYPE_TO_SERVICE_MAP[appeal_type]}", - 'function: secondary form submission to Lighthouse'] - StatsD.increment('silent_failure_avoided_no_confirmation', tags:) end private_class_method :record_email_send_successful @@ -112,6 +105,9 @@ def self.record_email_send_failure(submission, e) message: e.message } Rails.logger.error('DecisionReview::Form4142Submit retries exhausted email error', params) StatsD.increment("#{STATSD_KEY_PREFIX}.retries_exhausted.email_error", tags: ["appeal_type:#{appeal_type}"]) + + tags = ['service:supplemental-claims', 'function: secondary form submission to Lighthouse'] + StatsD.increment('silent_failure', tags:) end private_class_method :record_email_send_failure end diff --git a/app/sidekiq/decision_review/submit_upload.rb b/app/sidekiq/decision_review/submit_upload.rb index 4ed82a734c1..e3de31ce9bd 100644 --- a/app/sidekiq/decision_review/submit_upload.rb +++ b/app/sidekiq/decision_review/submit_upload.rb @@ -22,10 +22,6 @@ class SubmitUpload upload = AppealSubmissionUpload.find(appeal_submission_upload_id) submission = upload.appeal_submission - service_name = DecisionReviewV1::APPEAL_TYPE_TO_SERVICE_MAP[submission.type_of_appeal] - tags = ["service:#{service_name}", 'function: evidence submission to Lighthouse'] - StatsD.increment('silent_failure', tags:) - ::Rails.logger.error({ error_message:, message:, appeal_submission_upload_id:, job_id: }) StatsD.increment("#{STATSD_KEY_PREFIX}.permanent_error") @@ -189,10 +185,6 @@ def self.record_email_send_successful(upload, submission, notification_id) notification_id: } Rails.logger.info('DecisionReview::SubmitUpload retries exhausted email queued', params) StatsD.increment("#{STATSD_KEY_PREFIX}.retries_exhausted.email_queued") - - tags = ["service:#{DecisionReviewV1::APPEAL_TYPE_TO_SERVICE_MAP[appeal_type]}", - 'function: evidence submission to Lighthouse'] - StatsD.increment('silent_failure_avoided_no_confirmation', tags:) end private_class_method :record_email_send_successful @@ -204,6 +196,10 @@ def self.record_email_send_failure(upload, submission, e) message: e.message } Rails.logger.error('DecisionReview::SubmitUpload retries exhausted email error', params) StatsD.increment("#{STATSD_KEY_PREFIX}.retries_exhausted.email_error", tags: ["appeal_type:#{appeal_type}"]) + + service_name = DecisionReviewV1::APPEAL_TYPE_TO_SERVICE_MAP[appeal_type] + tags = ["service:#{service_name}", 'function: evidence submission to Lighthouse'] + StatsD.increment('silent_failure', tags:) end private_class_method :record_email_send_failure end diff --git a/modules/decision_reviews/app/sidekiq/decision_reviews/failure_notification_email_job.rb b/modules/decision_reviews/app/sidekiq/decision_reviews/failure_notification_email_job.rb index f5ef7618c54..0ff4b6fc8bc 100644 --- a/modules/decision_reviews/app/sidekiq/decision_reviews/failure_notification_email_job.rb +++ b/modules/decision_reviews/app/sidekiq/decision_reviews/failure_notification_email_job.rb @@ -146,10 +146,6 @@ def record_form_email_send_successful(submission, notification_id) params = { submitted_appeal_uuid: submission.submitted_appeal_uuid, appeal_type:, notification_id: } Rails.logger.info('DecisionReviews::FailureNotificationEmailJob form email queued', params) StatsD.increment("#{STATSD_KEY_PREFIX}.form.email_queued", tags: ["appeal_type:#{appeal_type}"]) - - tags = ["service:#{DecisionReviews::V1::APPEAL_TYPE_TO_SERVICE_MAP[appeal_type]}", - 'function: form submission to Lighthouse'] - StatsD.increment('silent_failure_avoided_no_confirmation', tags:) end def record_form_email_send_failure(submission, e) @@ -172,10 +168,6 @@ def record_secondary_form_email_send_successful(secondary_form, notification_id) notification_id: } Rails.logger.info('DecisionReviews::FailureNotificationEmailJob secondary form email queued', params) StatsD.increment("#{STATSD_KEY_PREFIX}.secondary_form.email_queued", tags: ["appeal_type:#{appeal_type}"]) - - tags = ["service:#{DecisionReviews::V1::APPEAL_TYPE_TO_SERVICE_MAP[appeal_type]}", - 'function: secondary form submission to Lighthouse'] - StatsD.increment('silent_failure_avoided_no_confirmation', tags:) end def record_secondary_form_email_send_failure(secondary_form, e) @@ -204,10 +196,6 @@ def record_evidence_email_send_successful(upload, notification_id) } Rails.logger.info('DecisionReviews::FailureNotificationEmailJob evidence email queued', params) StatsD.increment("#{STATSD_KEY_PREFIX}.evidence.email_queued", tags: ["appeal_type:#{appeal_type}"]) - - tags = ["service:#{DecisionReviews::V1::APPEAL_TYPE_TO_SERVICE_MAP[appeal_type]}", - 'function: evidence submission to Lighthouse'] - StatsD.increment('silent_failure_avoided_no_confirmation', tags:) end def record_evidence_email_send_failure(upload, e) diff --git a/modules/decision_reviews/app/sidekiq/decision_reviews/form4142_submit.rb b/modules/decision_reviews/app/sidekiq/decision_reviews/form4142_submit.rb index 6427e2fbf20..049cd459fbe 100644 --- a/modules/decision_reviews/app/sidekiq/decision_reviews/form4142_submit.rb +++ b/modules/decision_reviews/app/sidekiq/decision_reviews/form4142_submit.rb @@ -19,9 +19,6 @@ class Form4142Submit appeal_submission_id, _encrypted_payload, submitted_appeal_uuid = msg['args'] job_id = msg['jid'] - tags = ['service:supplemental-claims', 'function: secondary form submission to Lighthouse'] - StatsD.increment('silent_failure', tags:) - ::Rails.logger.error( { error_message:, @@ -99,10 +96,6 @@ def self.record_email_send_successful(submission, notification_id) notification_id: } Rails.logger.info('DecisionReviews::Form4142Submit retries exhausted email queued', params) StatsD.increment("#{STATSD_KEY_PREFIX}.retries_exhausted.email_queued") - - tags = ["service:#{DecisionReviews::V1::APPEAL_TYPE_TO_SERVICE_MAP[appeal_type]}", - 'function: secondary form submission to Lighthouse'] - StatsD.increment('silent_failure_avoided_no_confirmation', tags:) end private_class_method :record_email_send_successful @@ -113,6 +106,9 @@ def self.record_email_send_failure(submission, e) message: e.message } Rails.logger.error('DecisionReviews::Form4142Submit retries exhausted email error', params) StatsD.increment("#{STATSD_KEY_PREFIX}.retries_exhausted.email_error", tags: ["appeal_type:#{appeal_type}"]) + + tags = ['service:supplemental-claims', 'function: secondary form submission to Lighthouse'] + StatsD.increment('silent_failure', tags:) end private_class_method :record_email_send_failure end diff --git a/modules/decision_reviews/app/sidekiq/decision_reviews/submit_upload.rb b/modules/decision_reviews/app/sidekiq/decision_reviews/submit_upload.rb index 5df33f76e9e..d30a7c2311e 100644 --- a/modules/decision_reviews/app/sidekiq/decision_reviews/submit_upload.rb +++ b/modules/decision_reviews/app/sidekiq/decision_reviews/submit_upload.rb @@ -22,10 +22,6 @@ class SubmitUpload upload = AppealSubmissionUpload.find(appeal_submission_upload_id) submission = upload.appeal_submission - service_name = DecisionReviews::V1::APPEAL_TYPE_TO_SERVICE_MAP[submission.type_of_appeal] - tags = ["service:#{service_name}", 'function: evidence submission to Lighthouse'] - StatsD.increment('silent_failure', tags:) - ::Rails.logger.error({ error_message:, message:, appeal_submission_upload_id:, job_id: }) StatsD.increment("#{STATSD_KEY_PREFIX}.permanent_error") @@ -189,10 +185,6 @@ def self.record_email_send_successful(upload, submission, notification_id) notification_id: } Rails.logger.info('DecisionReviews::SubmitUpload retries exhausted email queued', params) StatsD.increment("#{STATSD_KEY_PREFIX}.retries_exhausted.email_queued") - - tags = ["service:#{DecisionReviews::V1::APPEAL_TYPE_TO_SERVICE_MAP[appeal_type]}", - 'function: evidence submission to Lighthouse'] - StatsD.increment('silent_failure_avoided_no_confirmation', tags:) end private_class_method :record_email_send_successful @@ -204,6 +196,10 @@ def self.record_email_send_failure(upload, submission, e) message: e.message } Rails.logger.error('DecisionReviews::SubmitUpload retries exhausted email error', params) StatsD.increment("#{STATSD_KEY_PREFIX}.retries_exhausted.email_error", tags: ["appeal_type:#{appeal_type}"]) + + service_name = DecisionReviews::V1::APPEAL_TYPE_TO_SERVICE_MAP[appeal_type] + tags = ["service:#{service_name}", 'function: evidence submission to Lighthouse'] + StatsD.increment('silent_failure', tags:) end private_class_method :record_email_send_failure end diff --git a/modules/decision_reviews/spec/sidekiq/form4142_submit_spec.rb b/modules/decision_reviews/spec/sidekiq/form4142_submit_spec.rb index 763cb002a60..45b242cd6fb 100644 --- a/modules/decision_reviews/spec/sidekiq/form4142_submit_spec.rb +++ b/modules/decision_reviews/spec/sidekiq/form4142_submit_spec.rb @@ -107,8 +107,6 @@ it 'increments statsd correctly when email is sent' do expect { described_class.new.sidekiq_retries_exhausted_block.call(msg) } .to trigger_statsd_increment('worker.decision_review.form4142_submit.permanent_error') - .and trigger_statsd_increment('silent_failure', tags:) - .and trigger_statsd_increment('silent_failure_avoided_no_confirmation', tags:) .and trigger_statsd_increment('worker.decision_review.form4142_submit.retries_exhausted.email_queued') end diff --git a/modules/decision_reviews/spec/sidekiq/submit_upload_spec.rb b/modules/decision_reviews/spec/sidekiq/submit_upload_spec.rb index d8a0c4abbd1..bb3e1712ab6 100644 --- a/modules/decision_reviews/spec/sidekiq/submit_upload_spec.rb +++ b/modules/decision_reviews/spec/sidekiq/submit_upload_spec.rb @@ -298,8 +298,6 @@ it 'increments statsd correctly when email is sent' do expect { described_class.new.sidekiq_retries_exhausted_block.call(msg) } .to trigger_statsd_increment('worker.decision_review.submit_upload.permanent_error') - .and trigger_statsd_increment('silent_failure', tags:) - .and trigger_statsd_increment('silent_failure_avoided_no_confirmation', tags:) .and trigger_statsd_increment('worker.decision_review.submit_upload.retries_exhausted.email_queued') end diff --git a/spec/sidekiq/decision_review/form4142_submit_spec.rb b/spec/sidekiq/decision_review/form4142_submit_spec.rb index 53f64b1354a..bee1221628c 100644 --- a/spec/sidekiq/decision_review/form4142_submit_spec.rb +++ b/spec/sidekiq/decision_review/form4142_submit_spec.rb @@ -104,8 +104,6 @@ it 'increments statsd correctly when email is sent' do expect { described_class.new.sidekiq_retries_exhausted_block.call(msg) } .to trigger_statsd_increment('worker.decision_review.form4142_submit.permanent_error') - .and trigger_statsd_increment('silent_failure', tags:) - .and trigger_statsd_increment('silent_failure_avoided_no_confirmation', tags:) .and trigger_statsd_increment('worker.decision_review.form4142_submit.retries_exhausted.email_queued') end diff --git a/spec/sidekiq/decision_review/submit_upload_spec.rb b/spec/sidekiq/decision_review/submit_upload_spec.rb index 467a8634753..e7ce86d750e 100644 --- a/spec/sidekiq/decision_review/submit_upload_spec.rb +++ b/spec/sidekiq/decision_review/submit_upload_spec.rb @@ -296,8 +296,6 @@ it 'increments statsd correctly when email is sent' do expect { described_class.new.sidekiq_retries_exhausted_block.call(msg) } .to trigger_statsd_increment('worker.decision_review.submit_upload.permanent_error') - .and trigger_statsd_increment('silent_failure', tags:) - .and trigger_statsd_increment('silent_failure_avoided_no_confirmation', tags:) .and trigger_statsd_increment('worker.decision_review.submit_upload.retries_exhausted.email_queued') end