Adding logging to track "No Targets Specified" error fixes VICE-598
Test Plan - Deploy and observe metric in datadog Change-Id: Ic86de9b772a72d6fab710d4a58433a843973cae7 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/241822 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Rob Orton <rob@instructure.com> QA-Review: Rob Orton <rob@instructure.com> Product-Review: Rob Orton <rob@instructure.com>
This commit is contained in:
parent
e9bb481bc0
commit
0cb4ca85cc
|
@ -638,9 +638,14 @@ class Message < ActiveRecord::Base
|
|||
def enqueue_to_sqs
|
||||
targets = notification_targets
|
||||
if targets.empty?
|
||||
# Log no_targets_specified error to DataDog
|
||||
InstStatsd::Statsd.increment("message.no_targets_specified",
|
||||
short_stat: 'message.no_targets_specified',
|
||||
tags: {path_type: path_type})
|
||||
|
||||
self.transmission_errors = "No notification targets specified"
|
||||
self.set_transmission_error
|
||||
else
|
||||
else
|
||||
targets.each do |target|
|
||||
Services::NotificationService.process(
|
||||
notification_service_id,
|
||||
|
|
Loading…
Reference in New Issue