vitals 0.8.1 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/vitals/integrations/rack/requests.rb +4 -1
- data/lib/vitals/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51bb7f1aa2f18bf65d499f41c765b3b5f640d940
|
4
|
+
data.tar.gz: 72db41b451eeab862f301fe12744fc61e5ccfdbc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f57c05004a563d6a5f312fbdb7ca11f3c9c3e4e1cfb36c269fd6811db4a962c293e1f2dc4d138cc4b17bd4b2cf0952fd5130181b97933c0931f8ab63b7603ed7
|
7
|
+
data.tar.gz: 5bfe19a3e3e880da7e408c488bca12b8cc394e1747fb14a8e0e3fd070ec87771ad815e467fbf09fd1bfe7ce6f5659a98d26ae5655fb14c2e00395c42aa7572de
|
data/Gemfile.lock
CHANGED
@@ -7,6 +7,7 @@ module Vitals::Integrations::Rack
|
|
7
7
|
SINATRA_PATH_INFO = 'sinatra.route'.freeze
|
8
8
|
GRAPE_PATH_INFO = 'api.endpoint'.freeze
|
9
9
|
RAILS_PATH_INFO = 'action_controller.instance'.freeze
|
10
|
+
REQ_PREF = 'vitals.req_prefix'
|
10
11
|
|
11
12
|
def initialize(app, options = {})
|
12
13
|
@app = app
|
@@ -17,6 +18,8 @@ module Vitals::Integrations::Rack
|
|
17
18
|
start = Time.now
|
18
19
|
status, header, body = @app.call(env)
|
19
20
|
t = Time.now - start
|
21
|
+
req_prefix = env[REQ_PREF] ? "#{env[REQ_PREF]}." : ''
|
22
|
+
|
20
23
|
path = if env[SINATRA_PATH_INFO]
|
21
24
|
Requests.sinatra_path(env)
|
22
25
|
elsif env[GRAPE_PATH_INFO]
|
@@ -26,7 +29,7 @@ module Vitals::Integrations::Rack
|
|
26
29
|
else
|
27
30
|
Requests.rack_path(env)
|
28
31
|
end
|
29
|
-
m = "requests.#{@prefix}#{path}.#{env[REQUEST_METHOD].downcase}.#{status}"
|
32
|
+
m = "requests.#{@prefix}#{req_prefix}#{path}.#{env[REQUEST_METHOD].downcase}.#{status}"
|
30
33
|
|
31
34
|
# TODO add option to customize 'requests' through options
|
32
35
|
Vitals.timing(m, Vitals::Utils.sec_to_ms(t))
|
data/lib/vitals/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vitals
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dotan Nahum
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: statsd-ruby
|