statsd counters for callback statuses

also for the 'code' param from firetext
This commit is contained in:
Leo Hemsted
2016-06-02 15:53:04 +01:00
parent af89f86389
commit d41048f4aa
3 changed files with 40 additions and 19 deletions

View File

@@ -39,6 +39,8 @@ def process_sms_client_response(status, reference, client_name):
except KeyError:
return success, 'unknown sms client: {}'.format(client_name)
statsd_client.incr('notifications.callback.{}.status.{}'.format(client_name.lower(), status))
# validate status
try:
response_dict = response_parser(status)