In T351401: Create service(s) to send an image to PhotoDNA for a scan, services are created to interface with the PhotoDNA API in a method that is compatible with scanning files from the mediamoderation_scan table. This service should be expanded to collect and publish to statsd information about how long it takes to receive a response from the PhotoDNA API as well as the number of requests sent to the API.
The existing implementation in RequestModerationCheck::requestModeration collects data on how long it takes to receive a response and publishes it to statsd. We can use this as a basis for the new services.
This data collection will allow monitoring of the response times along with setting up alerting to indicate when the response times exceed a threshold and/or if requests to the API drop below a threshold. This is needed so that we can investigate if the API becomes too slow or less requests are being made, as this is likely to make it harder or impossible to scan files faster than they are uploaded.
Acceptance criteria
- Collect and publish to statsd metrics about how long it takes for the PhotoDNA API to respond to a API request
- Collect and publish to statsd the average number of requests to PhotoDNA per day