Mike Lang
7155292765
middleware: Update references in comments to why Hijacker is needed
2016-11-07 11:52:19 -08:00
Mike Lang
35cf10e1d6
middleware/errorhandler: Implement Hijacker so it works with ws proxy
2016-11-02 14:50:13 -07:00
Mike Lang
6173e543c8
middleware/errorhandler: Fix a bug which meant it never works
...
Because methods operated on the value, not the reference, their changes
were discarded.
2016-10-27 17:08:42 -07:00
Mike Lang
0967bccaa2
appease linter
2016-10-26 13:48:10 -07:00
Mike Lang
7f528d1a78
middleware: Add an ErrorHandler middleware used to serve an alternate handler on a certain error code
2016-10-25 17:50:39 -07:00
Tom Wilkie
727404c9b8
Extend logging middleware to optionally only log failed HTTP requests ( #1909 )
...
* Extend logging middleware to optionally only log failed HTTP requests
* Add a preconfigured logger for logging failed requests, use it in the app.
* Wide definition of success
2016-10-07 18:03:36 -07:00
Tom Wilkie
39be421141
Allow a nil RouteMatcher in instrumentation ( #1852 )
...
So the instrumentation can be used for things other than gorilla.
2016-09-05 15:49:20 +01:00
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