Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

99537: Remove silent_failure_avoided_no_confirmation from DR jobs #19975

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions app/sidekiq/decision_review/failure_notification_email_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
10 changes: 3 additions & 7 deletions app/sidekiq/decision_review/form4142_submit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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:,
Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down
12 changes: 4 additions & 8 deletions app/sidekiq/decision_review/submit_upload.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:,
Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 0 additions & 2 deletions modules/decision_reviews/spec/sidekiq/submit_upload_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 0 additions & 2 deletions spec/sidekiq/decision_review/form4142_submit_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 0 additions & 2 deletions spec/sidekiq/decision_review/submit_upload_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading