Skip to content

Commit 8a28f44

Browse files
committed
add requests.method.[method]
1 parent f74926a commit 8a28f44

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

Readme.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
## Metrics
99

1010
- `requests` (counter) request count
11+
- `requests.method.<method>` (counter) requests by method
1112
- `request.size` (timer) request content-length
1213
- `response.ok` (counter) successful requests
1314
- `response.errors.client` (counter) client errors

statsd.go

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ func New(stats statsd.Client) func(http.Handler) http.Handler {
3333

3434
// request count
3535
stats.Incr("requests")
36+
stats.Incr("requests.method." + req.Method)
3637

3738
// request size
3839
stats.Histogram("request.size", int(req.ContentLength))

0 commit comments

Comments
 (0)