mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-27 02:41:23 -05:00
- 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
20 lines
532 B
Python
20 lines
532 B
Python
import logging
|
|
from app.clients.sms.firetext import (
|
|
FiretextClient
|
|
)
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
|
|
class LoadtestingClient(FiretextClient):
|
|
'''
|
|
Loadtest sms client.
|
|
'''
|
|
|
|
def init_app(self, config, statsd_client, *args, **kwargs):
|
|
super(FiretextClient, self).__init__(*args, **kwargs)
|
|
self.api_key = config.config.get('LOADTESTING_API_KEY')
|
|
self.from_number = config.config.get('LOADTESTING_NUMBER')
|
|
self.name = 'loadtesting'
|
|
self.statsd_client = statsd_client
|