14 Commits

Author SHA1 Message Date
Tom Wilkie
3173f6ad75 Use histograms over summaries 2016-07-12 11:15:57 +01:00
Julius Volz
4fa40e22b2 Rework Scope metrics according to Prometheus conventions. (#1615)
* Rework Scope metrics according to Prometheus conventions.

- counters should end with _total
- elaborated and added units to help strings
- recommended for cache hit/miss metrics: track only the total and the
  hits and in separate metrics, since the most common query will be
  "hits / total"
- track all times in seconds (base units), which has become the standard
  recommendation
- other small changes

There could be more changes that would require more thinking (what
dimensions to use, summaries vs. histograms, etc.), but this is probably
enough controversial material already :)

* Use timeRequestStatus() in sqs_control_router.go.
2016-06-30 09:12:25 +01:00
Jonathan Lange
39c9de8e2a Get route name before munging request
This ought to correct a problem where we incorrectly report route names
for admin routes
2016-06-15 16:06:19 +01:00
Alfonso Acosta
80f72638ce Add Indentity middleware 2016-06-09 14:30:53 +00:00
Tom Wilkie
982189161b If we don't get a path name from the router, make one up from the url. (#1570)
* If we don't get a path name from the router, make one up from the url.

* Think about route naming a little more and add a comment to show it.
2016-06-09 12:48:22 +01:00
Alfonso Acosta
116943f184 Rewrite net/http.Request.{URL.Path,RequestURI} consistently 2016-06-08 08:50:06 +00:00
Tom Wilkie
8d092c37e7 Also rewrite r.URL.Path, as gorilla mux reads this. 2016-05-23 16:18:24 +01:00
Tom Wilkie
3335361ae9 Include label in prom metric to distinguish ws connection latencies. 2016-05-23 15:02:41 +01:00
Tom Wilkie
5079a9eba4 Only log first http header. 2016-05-23 14:02:52 +01:00
Tom Wilkie
7631116ff5 Add explicity PathReplace middleware (#1393) 2016-04-28 12:28:44 +01:00
Tom Wilkie
e81b1b98e9 Add generic path rewrite middleware
And fix a bug in the logging middleware.
2016-04-26 14:43:48 +01:00
Tom Wilkie
734a01d603 Review feedback, lint & fix tests. 2016-04-06 15:59:02 +01:00
Tom Wilkie
727553962b Insturment the app with prometheus. 2016-04-06 14:58:28 +01:00
Tom Wilkie
a8f0d64b3c Add middleware for logging each request to the app. 2016-04-06 14:47:08 +01:00