diff --git a/app/dao/monthly_billing_dao.py b/app/dao/monthly_billing_dao.py index 606c02cc9..4528f414d 100644 --- a/app/dao/monthly_billing_dao.py +++ b/app/dao/monthly_billing_dao.py @@ -26,6 +26,7 @@ def get_service_ids_that_need_billing_populated(start_date, end_date): ).distinct().all() +@statsd(namespace="dao") def create_or_update_monthly_billing(service_id, billing_month): start_date, end_date = get_month_start_and_end_date_in_utc(billing_month) _update_monthly_billing(service_id, start_date, end_date, SMS_TYPE) @@ -47,6 +48,7 @@ def _monthly_billing_data_to_json(billing_data): return results +@statsd(namespace="dao") @transactional def _update_monthly_billing(service_id, start_date, end_date, notification_type): billing_data = get_billing_data_for_month( diff --git a/app/dao/notification_usage_dao.py b/app/dao/notification_usage_dao.py index 7542fb0df..afb547287 100644 --- a/app/dao/notification_usage_dao.py +++ b/app/dao/notification_usage_dao.py @@ -105,6 +105,7 @@ def is_between(date, start_date, end_date): return start_date <= date <= end_date +@statsd(namespace="dao") def billing_data_per_month_query(rate, service_id, start_date, end_date, notification_type): month = get_london_month_from_utc_column(NotificationHistory.created_at) if notification_type == SMS_TYPE: