three-things 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9cffd60f3075c57d985116f2eaf9eef3cb7f9176
4
- data.tar.gz: c12344aff8ced527c52568ae8c23b3d886a8b687
3
+ metadata.gz: d0ee3d116f83a8d39ff3d1913890b035814cf2b2
4
+ data.tar.gz: 97488697558aa3e715279a13d8746e858cc3ac6c
5
5
  SHA512:
6
- metadata.gz: 60ef833713b43bcd2c63f3453ca62481bf85571770862ace5f8e2ae02a6de05201f78a5fa1938ac80db9080ffeafdb15dcc9a640f7cfb5e8cbdae701703149f9
7
- data.tar.gz: 1a28dbe5632082230b9b7176e2dd315c75cf6546dc112b962f0c2e5df757d203bfb3800ed2b6a3ba1606989ec82d6d596513f4a5d7ecd14705cf798debf35872
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]
@@ -1,3 +1,3 @@
1
1
  module ThreeThings
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: three-things
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nat Welch