librato-rack 2.0.2 → 2.0.3
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 +7 -0
- checksums.yaml.gz.sig +2 -0
- data.tar.gz.sig +2 -1
- data/CHANGELOG.md +3 -0
- data/README.md +2 -1
- data/lib/librato/rack/tracker.rb +3 -1
- data/lib/librato/rack/version.rb +1 -1
- data/test/unit/rack/tracker_test.rb +17 -0
- metadata +42 -62
- metadata.gz.sig +0 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 2e87682af9b37ced1a2ba02d00b6635cad23e645
|
4
|
+
data.tar.gz: b127abcd2ec03184ef80cd8a370c5f8fef4bac5a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 53bdbf9cc39ccefe383e6688a282ffd417f7b4a70f6d402bb51b2e77a9029591bc09e6beccc4fc1d0d772400314afd6fb2bed73b5ab6e73c449a1d96dad63529
|
7
|
+
data.tar.gz: 39101eb721b0b5412874eb88d119a42d48b1037616143b4e3d55176b232fec687f011e21bb73ebc52660c54c8ee690723023dfa02fd4c57f0794a03f520145df
|
checksums.yaml.gz.sig
ADDED
data.tar.gz.sig
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
�&���}}�I����*H��!����Fm!|���A"��´ޠi��l�-wPO�7ܩ�H&�C���6i�!��x;��n�v\��86�f���TY��yfS<�MD���A% �=���<�1~a
|
2
|
+
���X�'�Nİ�����"��߯��o�X���V�u�����<,�����Ȍ�H|�D����d��\aFh7���
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -5,6 +5,7 @@ librato-rack
|
|
5
5
|
|
6
6
|
---
|
7
7
|
|
8
|
+
## Important note on breaking change
|
8
9
|
**NOTE:** Starting with version 2.0.0 librato-rack requires a Librato account that [supports tagged metrics](https://www.librato.com/docs/kb/faq/account_questions/tags_or_sources/).
|
9
10
|
|
10
11
|
If your Librato account doesn't yet support tagged metrics or you are using [a heroku addon](https://devcenter.heroku.com/articles/librato#using-with-ruby), please use the [1.x.x version](https://rubygems.org/gems/librato-rack/versions/1.1.0).
|
@@ -113,7 +114,7 @@ use Librato::Rack, :config => config
|
|
113
114
|
|
114
115
|
The metrics recorded by `librato-rack` are organized into named metric suites that can be selectively enabled/disabled:
|
115
116
|
|
116
|
-
* `rack`: The `rack.request.total`, `rack.request.time`, `rack.request.slow`,
|
117
|
+
* `rack`: The `rack.request.total`, `rack.request.time`, `rack.request.slow`, `rack.request.queue.time`, and `rack.processes` metrics
|
117
118
|
* `rack_status`: `rack.request.status` metric with `status` tag name and HTTP status code tag value, e.g. `status=200`
|
118
119
|
* `rack_method`: `rack.request.method` metric with `method` tag name and HTTP method tag value, e.g. `method=POST`
|
119
120
|
|
data/lib/librato/rack/tracker.rb
CHANGED
@@ -125,7 +125,9 @@ module Librato
|
|
125
125
|
[collector.counters, collector.aggregate].each do |cache|
|
126
126
|
cache.flush_to(queue, preserve: preserve)
|
127
127
|
end
|
128
|
-
|
128
|
+
if suite_enabled?(:rack)
|
129
|
+
queue.add 'rack.processes' => { value: 1, tags: tags }
|
130
|
+
end
|
129
131
|
trace_queued(queue.queued) #if should_log?(:trace)
|
130
132
|
queue
|
131
133
|
end
|
data/lib/librato/rack/version.rb
CHANGED
@@ -93,6 +93,23 @@ module Librato
|
|
93
93
|
ENV.delete('LIBRATO_SUITES')
|
94
94
|
end
|
95
95
|
|
96
|
+
def test_rack_process_queued
|
97
|
+
ENV['LIBRATO_SUITES'] = 'all'
|
98
|
+
tracker = Tracker.new(Configuration.new)
|
99
|
+
refute_nil tracker.queued[:measurements]
|
100
|
+
refute_nil tracker.queued[:measurements].detect { |measurement| measurement[:name] == 'rack.processes' }
|
101
|
+
ensure
|
102
|
+
ENV.delete('LIBRATO_SUITES')
|
103
|
+
end
|
104
|
+
|
105
|
+
def test_rack_process_not_queued
|
106
|
+
ENV['LIBRATO_SUITES'] = 'none'
|
107
|
+
tracker = Tracker.new(Configuration.new)
|
108
|
+
assert_nil tracker.queued[:measurements]
|
109
|
+
ensure
|
110
|
+
ENV.delete('LIBRATO_SUITES')
|
111
|
+
end
|
112
|
+
|
96
113
|
private
|
97
114
|
|
98
115
|
def buffer_lines
|
metadata
CHANGED
@@ -1,89 +1,76 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: librato-rack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
5
|
-
prerelease:
|
4
|
+
version: 2.0.3
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Matt Sanders
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain:
|
12
|
-
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
N3FHc3B5cFQwVWgvdy9Cb2RFY0d1QWFaWkZsa1U5dm90dFRlNndXTm5NNmhm
|
35
|
-
UkV4aVNJc3Irb1ZlCnM4czgzT2JzaGp1U3pqT3FTNTZJQnRObFBFTCtENmdo
|
36
|
-
alpaTFAzbFM2bDlwNzBQY3BjbCtJY0U0dmVxWm1tS0MKc0dlcGdSY2xDNlVi
|
37
|
-
WmgreVEzYWxYVmdoTTJxc29uQXdJL3JUTm1GSk45a1FuNm5QOStmMVVmL3Fa
|
38
|
-
Rk5jam40TAo5Ymc9Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K
|
39
|
-
date: 2017-03-20 00:00:00.000000000 Z
|
11
|
+
- |
|
12
|
+
-----BEGIN CERTIFICATE-----
|
13
|
+
MIIDLjCCAhagAwIBAgIBADANBgkqhkiG9w0BAQUFADA9MQ0wCwYDVQQDDARydW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lS6l9p70Pcpcl+IcE4veqZmmKC
|
29
|
+
sGepgRclC6UbZh+yQ3alXVghM2qsonAwI/rTNmFJN9kQn6nP9+f1Uf/qZFNcjn4L
|
30
|
+
9bg=
|
31
|
+
-----END CERTIFICATE-----
|
32
|
+
date: 2017-06-23 00:00:00.000000000 Z
|
40
33
|
dependencies:
|
41
34
|
- !ruby/object:Gem::Dependency
|
42
35
|
name: librato-metrics
|
43
36
|
requirement: !ruby/object:Gem::Requirement
|
44
|
-
none: false
|
45
37
|
requirements:
|
46
|
-
- - ~>
|
38
|
+
- - "~>"
|
47
39
|
- !ruby/object:Gem::Version
|
48
40
|
version: 2.1.0
|
49
41
|
type: :runtime
|
50
42
|
prerelease: false
|
51
43
|
version_requirements: !ruby/object:Gem::Requirement
|
52
|
-
none: false
|
53
44
|
requirements:
|
54
|
-
- - ~>
|
45
|
+
- - "~>"
|
55
46
|
- !ruby/object:Gem::Version
|
56
47
|
version: 2.1.0
|
57
48
|
- !ruby/object:Gem::Dependency
|
58
49
|
name: hetchy
|
59
50
|
requirement: !ruby/object:Gem::Requirement
|
60
|
-
none: false
|
61
51
|
requirements:
|
62
|
-
- - ~>
|
52
|
+
- - "~>"
|
63
53
|
- !ruby/object:Gem::Version
|
64
54
|
version: '1.0'
|
65
55
|
type: :runtime
|
66
56
|
prerelease: false
|
67
57
|
version_requirements: !ruby/object:Gem::Requirement
|
68
|
-
none: false
|
69
58
|
requirements:
|
70
|
-
- - ~>
|
59
|
+
- - "~>"
|
71
60
|
- !ruby/object:Gem::Version
|
72
61
|
version: '1.0'
|
73
62
|
- !ruby/object:Gem::Dependency
|
74
63
|
name: minitest
|
75
64
|
requirement: !ruby/object:Gem::Requirement
|
76
|
-
none: false
|
77
65
|
requirements:
|
78
|
-
- -
|
66
|
+
- - ">="
|
79
67
|
- !ruby/object:Gem::Version
|
80
68
|
version: '0'
|
81
69
|
type: :development
|
82
70
|
prerelease: false
|
83
71
|
version_requirements: !ruby/object:Gem::Requirement
|
84
|
-
none: false
|
85
72
|
requirements:
|
86
|
-
- -
|
73
|
+
- - ">="
|
87
74
|
- !ruby/object:Gem::Version
|
88
75
|
version: '0'
|
89
76
|
description: Rack middleware to report key app statistics and custom instrumentation
|
@@ -95,25 +82,25 @@ executables: []
|
|
95
82
|
extensions: []
|
96
83
|
extra_rdoc_files: []
|
97
84
|
files:
|
85
|
+
- CHANGELOG.md
|
86
|
+
- LICENSE
|
87
|
+
- README.md
|
88
|
+
- Rakefile
|
89
|
+
- lib/librato-rack.rb
|
90
|
+
- lib/librato/collector.rb
|
98
91
|
- lib/librato/collector/aggregator.rb
|
99
92
|
- lib/librato/collector/counter_cache.rb
|
100
93
|
- lib/librato/collector/exceptions.rb
|
101
94
|
- lib/librato/collector/group.rb
|
102
|
-
- lib/librato/
|
103
|
-
- lib/librato/rack/configuration/suites.rb
|
95
|
+
- lib/librato/rack.rb
|
104
96
|
- lib/librato/rack/configuration.rb
|
97
|
+
- lib/librato/rack/configuration/suites.rb
|
105
98
|
- lib/librato/rack/errors.rb
|
106
99
|
- lib/librato/rack/logger.rb
|
107
100
|
- lib/librato/rack/tracker.rb
|
108
101
|
- lib/librato/rack/validating_queue.rb
|
109
102
|
- lib/librato/rack/version.rb
|
110
103
|
- lib/librato/rack/worker.rb
|
111
|
-
- lib/librato/rack.rb
|
112
|
-
- lib/librato-rack.rb
|
113
|
-
- LICENSE
|
114
|
-
- Rakefile
|
115
|
-
- README.md
|
116
|
-
- CHANGELOG.md
|
117
104
|
- test/apps/basic.ru
|
118
105
|
- test/apps/custom.ru
|
119
106
|
- test/apps/custom_suites.ru
|
@@ -141,33 +128,26 @@ files:
|
|
141
128
|
homepage: https://github.com/librato/librato-rack
|
142
129
|
licenses:
|
143
130
|
- BSD-3-Clause
|
131
|
+
metadata: {}
|
144
132
|
post_install_message:
|
145
133
|
rdoc_options: []
|
146
134
|
require_paths:
|
147
135
|
- lib
|
148
136
|
required_ruby_version: !ruby/object:Gem::Requirement
|
149
|
-
none: false
|
150
137
|
requirements:
|
151
|
-
- -
|
138
|
+
- - ">="
|
152
139
|
- !ruby/object:Gem::Version
|
153
140
|
version: '0'
|
154
|
-
segments:
|
155
|
-
- 0
|
156
|
-
hash: -2408742932426034102
|
157
141
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
158
|
-
none: false
|
159
142
|
requirements:
|
160
|
-
- -
|
143
|
+
- - ">="
|
161
144
|
- !ruby/object:Gem::Version
|
162
145
|
version: '0'
|
163
|
-
segments:
|
164
|
-
- 0
|
165
|
-
hash: -2408742932426034102
|
166
146
|
requirements: []
|
167
147
|
rubyforge_project:
|
168
|
-
rubygems_version:
|
148
|
+
rubygems_version: 2.4.5.1
|
169
149
|
signing_key:
|
170
|
-
specification_version:
|
150
|
+
specification_version: 4
|
171
151
|
summary: Use Librato Metrics with your rack application
|
172
152
|
test_files:
|
173
153
|
- test/apps/basic.ru
|
metadata.gz.sig
CHANGED
Binary file
|