[keyserver] Introduce logEndpointMetrics and yarn dev-log-metrics
Summary:
Introduce logEndpointMetrics middleware (on Express middleware: https://expressjs.com/en/guide/using-middleware.html) to log request-response duration and Content-Length for each endpoint.
This middleware is enabled when KEYSERVER_ENDPOINT_METRICS_ENABLED is set.
Will introduce a separate yarn command to write logs to disk
Test Plan:
Logs look as expected when KEYSERVER_ENDPOINT_METRICS_ENABLED is set:
Logs don't appear when KEYSERVER_ENDPOINT_METRICS_ENABLED is unset.
Reviewers: ashoat, ginsu, tomek, rohan
Reviewed By: ashoat
Differential Revision: https://phab.comm.dev/D9308