rack-graphite 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -7
- data/README.md +1 -2
- data/lib/rack/graphite/version.rb +1 -2
- data/lib/rack/graphite.rb +3 -3
- data/rack-graphite.gemspec +1 -1
- data/spec/graphite_spec.rb +2 -2
- metadata +43 -39
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
|
-
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
MTVhNThkNTkzMWE0YTMwZDlkOTljM2NjMGZjM2JlMTMxMTBhOTgwOA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
ZTFhM2RjYjZhNzNkYzhmNzk2NDU4ZjdiOWJhNDI5MzI1M2Q3NWFkMQ==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MmUwZTg4MDNjNWY5ODYzM2FhZWUyNTU0NjAzOGIxYTMxMzIxMGVmZjVkMTI3
|
10
|
+
MWQ4ZDhiN2MxYjNhNTJkMDhmNzU0NmZlM2NjN2UxZTJjYTU0N2JjNWNiNWIx
|
11
|
+
ZTgwNzI5MjA2OGQxZGY1NzIwMzM1NjQ4YmM3ZWI0NWE0ZGU4OGU=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
MTVhYzQwNjMxOWI3NzhmN2JmMWEzMWU4NTEzMTZmMThhMjRlY2EyZWMwZmM4
|
14
|
+
MzYxNDg3NjMzNmE3ZWVlM2E1ZjA4ZjRhYjY0YzVkOTlhYmJlYjFmNTI0ODU2
|
15
|
+
Y2FhZjBmZDFhMTYyYzQ1NzA3M2NkNmYwMGRiNzg5MDIzY2FjYzM=
|
data/README.md
CHANGED
@@ -6,7 +6,7 @@ Rack middleware for automatically logging request information to Graphite.
|
|
6
6
|
|
7
7
|
This gem assumes that you're using
|
8
8
|
[lookout-statsd](https://github.com/lookout/statsd) and have already initalized
|
9
|
-
`Statsd.instance` in your environment before handling any requests.
|
9
|
+
`Lookout::Statsd.instance` in your environment before handling any requests.
|
10
10
|
|
11
11
|
By default this will log metrics such as:
|
12
12
|
|
@@ -52,4 +52,3 @@ By default this will log metrics such as:
|
|
52
52
|
'Hello!'
|
53
53
|
end
|
54
54
|
end
|
55
|
-
|
data/lib/rack/graphite.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require 'statsd'
|
1
|
+
require 'lookout/statsd'
|
2
2
|
|
3
3
|
module Rack
|
4
4
|
class Graphite
|
@@ -19,10 +19,10 @@ module Rack
|
|
19
19
|
metric = path_to_graphite(method, path)
|
20
20
|
|
21
21
|
status, headers, body = nil
|
22
|
-
Statsd.instance.timing(metric) do
|
22
|
+
Lookout::Statsd.instance.timing(metric) do
|
23
23
|
status, headers, body = @app.call(env)
|
24
24
|
end
|
25
|
-
Statsd.instance.increment("#{metric}.response.#{status}")
|
25
|
+
Lookout::Statsd.instance.increment("#{metric}.response.#{status}")
|
26
26
|
return status, headers, body
|
27
27
|
end
|
28
28
|
|
data/rack-graphite.gemspec
CHANGED
data/spec/graphite_spec.rb
CHANGED
@@ -2,10 +2,10 @@ require 'spec_helper'
|
|
2
2
|
require 'securerandom'
|
3
3
|
|
4
4
|
describe Rack::Graphite do
|
5
|
-
let(:statsd) { double('Mock
|
5
|
+
let(:statsd) { double('Mock Lookout::StatsdClient') }
|
6
6
|
|
7
7
|
before :each do
|
8
|
-
Statsd.stub(:instance).and_return(statsd)
|
8
|
+
Lookout::Statsd.stub(:instance).and_return(statsd)
|
9
9
|
end
|
10
10
|
|
11
11
|
|
metadata
CHANGED
@@ -1,47 +1,50 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-graphite
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
|
-
authors:
|
6
|
+
authors:
|
7
7
|
- R. Tyler Croy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
- !ruby/object:Gem::Dependency
|
11
|
+
date: 2016-07-15 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
15
14
|
name: bundler
|
16
|
-
requirement:
|
17
|
-
requirements:
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
18
17
|
- - ~>
|
19
|
-
- !ruby/object:Gem::Version
|
20
|
-
version:
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.3'
|
21
20
|
type: :development
|
22
21
|
prerelease: false
|
23
|
-
version_requirements:
|
24
|
-
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
25
28
|
name: lookout-statsd
|
26
|
-
requirement:
|
27
|
-
requirements:
|
28
|
-
-
|
29
|
-
-
|
30
|
-
|
31
|
-
version: "0"
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3.0'
|
32
34
|
type: :runtime
|
33
35
|
prerelease: false
|
34
|
-
version_requirements:
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '3.0'
|
35
41
|
description: Simple Rack middleware for logging request counts/timing information
|
36
|
-
email:
|
42
|
+
email:
|
37
43
|
- rtyler.croy@lookout.com
|
38
44
|
executables: []
|
39
|
-
|
40
45
|
extensions: []
|
41
|
-
|
42
46
|
extra_rdoc_files: []
|
43
|
-
|
44
|
-
files:
|
47
|
+
files:
|
45
48
|
- .gitignore
|
46
49
|
- Gemfile
|
47
50
|
- LICENSE
|
@@ -53,28 +56,29 @@ files:
|
|
53
56
|
- spec/graphite_spec.rb
|
54
57
|
- spec/spec_helper.rb
|
55
58
|
homepage: https://github.com/lookout/rack-graphite
|
56
|
-
licenses:
|
59
|
+
licenses:
|
57
60
|
- MIT
|
58
61
|
metadata: {}
|
59
|
-
|
60
62
|
post_install_message:
|
61
63
|
rdoc_options: []
|
62
|
-
|
63
|
-
require_paths:
|
64
|
+
require_paths:
|
64
65
|
- lib
|
65
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
66
|
-
requirements:
|
67
|
-
-
|
68
|
-
|
69
|
-
|
70
|
-
|
66
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - ! '>='
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '0'
|
71
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ! '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
71
76
|
requirements: []
|
72
|
-
|
73
77
|
rubyforge_project:
|
74
|
-
rubygems_version: 2.4.
|
78
|
+
rubygems_version: 2.4.6
|
75
79
|
signing_key:
|
76
80
|
specification_version: 4
|
77
81
|
summary: Simple Rack middleware for logging request counts/timing information
|
78
|
-
test_files:
|
82
|
+
test_files:
|
79
83
|
- spec/graphite_spec.rb
|
80
84
|
- spec/spec_helper.rb
|