three-things 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/three-things/middleware.rb +5 -3
- data/lib/three-things/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0ee3d116f83a8d39ff3d1913890b035814cf2b2
|
4
|
+
data.tar.gz: 97488697558aa3e715279a13d8746e858cc3ac6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1c1596b43c611a4c2555cc3c6e20f9a9098ed9cff56ffaa81eeeb2c718262fcfb8806138de2732de98ed113d65e7f7e8d95a7791c7bd618210a496eef5fc57b
|
7
|
+
data.tar.gz: 83baeb974b4bd1b8f804dfe757a2871640b71ba02b0b510ccaf860fae51f2a81cc759058fdcdc7ff8b475d607ff732ff3802292d70de97a20e788ba8c1bd72a1
|
@@ -18,17 +18,19 @@ module ThreeThings
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def call env
|
21
|
+
req = Rack::Request.new(env)
|
22
|
+
|
21
23
|
# Request count
|
22
|
-
@statsd.increment path("request.count")
|
24
|
+
@statsd.increment path("request.count"), {path: req.path}
|
23
25
|
|
24
26
|
# Reqest time
|
25
|
-
status, headers, body = @statsd.time path("request.time") do
|
27
|
+
status, headers, body = @statsd.time path("request.time"), {path: req.path} do
|
26
28
|
@app.call env
|
27
29
|
end
|
28
30
|
|
29
31
|
# Request errors
|
30
32
|
if status > 308
|
31
|
-
@statsd.increment path("request.error"), {status_code: status}
|
33
|
+
@statsd.increment path("request.error"), {status_code: status, path: req.path}
|
32
34
|
end
|
33
35
|
|
34
36
|
[status, headers, body]
|
data/lib/three-things/version.rb
CHANGED