From b1336c97a4a6c0134d35462d30fbf9843e6adc14 Mon Sep 17 00:00:00 2001 From: David McDonald Date: Mon, 30 Nov 2020 15:03:52 +0000 Subject: [PATCH] Tweak sending time metrics to only include live notifications Changes the high volume and not high volume metrics to both only include non test notifications. This is because when looking at the grafana metrics, it was impossible to tell what affect the high volume/non high volume effect was having vs the test/live notification effect. This leaves us with no break down of high volume/not high volume sending times for test notifications but I don't think we really need that. --- app/delivery/send_to_providers.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/app/delivery/send_to_providers.py b/app/delivery/send_to_providers.py index cdd34848c..11ab3bc2a 100644 --- a/app/delivery/send_to_providers.py +++ b/app/delivery/send_to_providers.py @@ -80,11 +80,10 @@ def send_sms_to_provider(notification): statsd_client.timing("sms.test-key.total-time", delta_seconds) else: statsd_client.timing("sms.live-key.total-time", delta_seconds) - - if service.id in current_app.config.get('HIGH_VOLUME_SERVICE'): - statsd_client.timing("sms.high-volume.total-time", delta_seconds) - else: - statsd_client.timing("sms.not-high-volume.total-time", delta_seconds) + if service.id in current_app.config.get('HIGH_VOLUME_SERVICE'): + statsd_client.timing("sms.live-key.high-volume.total-time", delta_seconds) + else: + statsd_client.timing("sms.live-key.not-high-volume.total-time", delta_seconds) def send_email_to_provider(notification): @@ -136,11 +135,10 @@ def send_email_to_provider(notification): statsd_client.timing("email.test-key.total-time", delta_seconds) else: statsd_client.timing("email.live-key.total-time", delta_seconds) - - if service.id in current_app.config.get('HIGH_VOLUME_SERVICE'): - statsd_client.timing("email.high-volume.total-time", delta_seconds) - else: - statsd_client.timing("email.not-high-volume.total-time", delta_seconds) + if service.id in current_app.config.get('HIGH_VOLUME_SERVICE'): + statsd_client.timing("email.live-key.high-volume.total-time", delta_seconds) + else: + statsd_client.timing("email.live-key.not-high-volume.total-time", delta_seconds) def update_notification_to_sending(notification, provider):