You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+93Lines changed: 93 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -47,6 +47,7 @@ In fact the internal code of **go-json-rest** is itself implemented with Middlew
47
47
- [Streaming](#streaming)
48
48
- [Non JSON payload](#non-json-payload)
49
49
- [API Versioning](#api-versioning)
50
+
- [Statsd](#statsd)
50
51
- [SPDY](#spdy)
51
52
- [Google App Engine](#gae)
52
53
- [Basic Auth Custom](#basic-auth-custom)
@@ -1125,6 +1126,98 @@ func main() {
1125
1126
1126
1127
```
1127
1128
1129
+
#### Statsd
1130
+
1131
+
Demonstrate how to use OuterMiddlewares to do additional logging and reporting.
1132
+
1133
+
Here `request.Env["STATUS_CODE"]` and `request.Env["ELAPSED_TIME"]` that are available to outer middlewares are used with the [g2s](https://github.com/peterbourgon/g2s) statsd client to send these metrics to statsd.
0 commit comments