stats: Add network and http statisics (#3686)

Network: total bytes of incoming and outgoing server's data
by taking advantage of our ConnMux Read/Write wrapping

HTTP: total number of different http verbs passed in http
requests and different status codes passed in http responses.
This is counted in a new http handler.
This commit is contained in:
Anis Elleuch
2017-02-06 18:29:53 +01:00
committed by Harshavardhana
parent 6717a0b68c
commit 93fd269329
5 changed files with 208 additions and 12 deletions

View File

@@ -84,6 +84,8 @@ func configureServerHandler(srvCmdConfig serverCmdConfig) (http.Handler, error)
// List of some generic handlers which are applied for all incoming requests.
var handlerFns = []HandlerFunc{
// Network statistics
setHTTPStatsHandler,
// Limits all requests size to a maximum fixed limit
setRequestSizeLimitHandler,
// Adds 'crossdomain.xml' policy handler to serve legacy flash clients.