In addition to logs (T263545), Shellbox should also emit metrics to help measure and assess the health of the application. We should able to use the PHP statsd client library and have it go to a sidecar that prometheus scrapes.
Proposed metrics:
- counter of requests per endpoint (e.g. Score, imagemagick, etc.)
- not sure if we need a separate counter for errors, or that can be inferred from logging?
- timing how long it takes for Shellbox to process each request, split per endpoint
In theory these metrics could also be collected/emitted by the MediaWiki client too.