diff --git a/app/clients/sms/firetext.py b/app/clients/sms/firetext.py index 9617b88bf..911c88bda 100644 --- a/app/clients/sms/firetext.py +++ b/app/clients/sms/firetext.py @@ -113,6 +113,6 @@ class FiretextClient(SmsClient): raise FiretextClientResponseException(response=e.response, exception=e) finally: elapsed_time = monotonic() - start_time - self.current_app.logger.info("Firetext request finished in {}".format(elapsed_time)) + self.current_app.logger.info("Firetext request for {} finished in {}".format(reference, elapsed_time)) self.statsd_client.timing("clients.firetext.request-time", elapsed_time) return response diff --git a/app/clients/sms/mmg.py b/app/clients/sms/mmg.py index b036d637c..642a247a9 100644 --- a/app/clients/sms/mmg.py +++ b/app/clients/sms/mmg.py @@ -120,6 +120,6 @@ class MMGClient(SmsClient): finally: elapsed_time = monotonic() - start_time self.statsd_client.timing("clients.mmg.request-time", elapsed_time) - self.current_app.logger.info("MMG request finished in {}".format(elapsed_time)) + self.current_app.logger.info("MMG request for {} finished in {}".format(reference, elapsed_time)) return response diff --git a/app/delivery/send_to_providers.py b/app/delivery/send_to_providers.py index 55da5d933..28b61a530 100644 --- a/app/delivery/send_to_providers.py +++ b/app/delivery/send_to_providers.py @@ -19,6 +19,9 @@ from app.models import SMS_TYPE, KEY_TYPE_TEST, BRANDING_ORG, EMAIL_TYPE def send_sms_to_provider(notification): service = dao_fetch_service_by_id(notification.service_id) provider = provider_to_use(SMS_TYPE, notification.id) + current_app.logger.info( + "Starting sending SMS {} to provider at {}".format(notification.id, datetime.utcnow()) + ) if notification.status == 'created': template_model = dao_get_template_by_id(notification.template_id, notification.template_version) template = SMSMessageTemplate( @@ -47,7 +50,7 @@ def send_sms_to_provider(notification): dao_update_notification(notification) current_app.logger.info( - "SMS {} sent to provider at {}".format(notification.id, notification.sent_at) + "SMS {} sent to provider {} at {}".format(notification.id, provider.get_name(), notification.sent_at) ) delta_milliseconds = (datetime.utcnow() - notification.created_at).total_seconds() * 1000 statsd_client.timing("sms.total-time", delta_milliseconds) @@ -56,6 +59,9 @@ def send_sms_to_provider(notification): def send_email_to_provider(notification): service = dao_fetch_service_by_id(notification.service_id) provider = provider_to_use(EMAIL_TYPE, notification.id) + current_app.logger.info( + "Starting sending EMAIL {} to provider at {}".format(notification.id, datetime.utcnow()) + ) if notification.status == 'created': template_dict = dao_get_template_by_id(notification.template_id, notification.template_version).__dict__