mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-23 15:56:45 -04:00
Added statsd integration into the API
- new client for statsd, follows conventions used elsewhere for configuration - client wraps underlying library so we can use a config property to send/not send statsd Added statsd metrics for: - count of API successful calls SMS/Email - count of successful task execution for SMS/Email - count of errors from Client libraries - timing of API calls to third party clients - timing of how long messages live on the SQS queue
This commit is contained in:
10
config.py
10
config.py
@@ -87,12 +87,20 @@ class Config(object):
|
||||
CSV_UPLOAD_BUCKET_NAME = 'local-notifications-csv-upload'
|
||||
NOTIFICATIONS_ALERT = 5 # five mins
|
||||
|
||||
STATSD_ENABLED = False
|
||||
STATSD_HOST = "localhost"
|
||||
STATSD_PORT = None
|
||||
STATSD_PREFIX = None
|
||||
|
||||
|
||||
class Development(Config):
|
||||
DEBUG = True
|
||||
MMG_API_KEY = os.environ['MMG_API_KEY']
|
||||
CSV_UPLOAD_BUCKET_NAME = 'development-notifications-csv-upload'
|
||||
|
||||
STATSD_ENABLED = True
|
||||
STATSD_HOST = os.getenv('STATSD_HOST')
|
||||
STATSD_PORT = os.getenv('STATSD_PORT')
|
||||
STATSD_PREFIX = os.getenv('STATSD_PREFIX')
|
||||
|
||||
class Preview(Config):
|
||||
MMG_API_KEY = os.environ['MMG_API_KEY']
|
||||
|
||||
Reference in New Issue
Block a user