mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 23:55:58 -05:00
statsd counters for callback statuses
also for the 'code' param from firetext
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
from datetime import datetime
|
||||
import statsd
|
||||
import itertools
|
||||
from flask import (
|
||||
Blueprint,
|
||||
@@ -177,6 +176,8 @@ def process_firetext_response():
|
||||
current_app.logger.info(validation_errors)
|
||||
return jsonify(result='error', message=validation_errors), 400
|
||||
|
||||
statsd_client.incr('notifications.callback.firetext.code.{}'.format(request.form.get('code')))
|
||||
|
||||
success, errors = process_sms_client_response(status=request.form.get('status'),
|
||||
reference=request.form.get('reference'),
|
||||
client_name=client_name)
|
||||
|
||||
Reference in New Issue
Block a user