librato-rails 0.11.1 → 0.12.0.beta

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 152f49ff52bc46153e592778c2e200c1a27b7212
4
- data.tar.gz: e13fd4c9094655017a4d768b743d8c1106c1af21
3
+ metadata.gz: 061a0b954550c13083a49275f67d6e4b9fe0c2ba
4
+ data.tar.gz: c05a4c4c3a6744d0be5c8062236ded43bb148df8
5
5
  SHA512:
6
- metadata.gz: a6999cb0ecb28909e940e07211a4cf846cc5f8adfab66018626088af150d7ba85b7fa4d9d0065a2c068c16498de50dfa4dc7ba248bf98ae62537bcef32e051d3
7
- data.tar.gz: e516c899ebf1a8027f2d03989e14a95b03fc9abd7488770817315d37658434c4cc44abc646c6330cc7a6cb27f14296d8e4df50765f0fc07b219286e2fc79aeb5
6
+ metadata.gz: 0d137595c22bf02f19a9cb190619304173b68fd6f834197a0dfe6007592a8ca91127cd660439fdbbec9b323222d1d8472765c974b5b48205a17d105d2a12baac
7
+ data.tar.gz: 3425c4dac77c769ec32b3e93eed4bef75c7b878b2c21dace0e3a08fe1abb45288f873ad9b283d920b4864d97f82ff98882a06ce305c3df8e67d34b3ff7e64e6d
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ###
2
+ * Add percentile support for timings
3
+ * Start reporting 95th percentile for key ActionController metrics
4
+
1
5
  ### Version 0.11.1
2
6
  * Use controller/action as source for instrument_action metrics
3
7
 
data/README.md CHANGED
@@ -133,6 +133,9 @@ Like `Librato.measure` this is per-request, but specialized for timing informati
133
133
 
134
134
  ```ruby
135
135
  Librato.timing 'twitter.lookup.time', 21.2
136
+
137
+ # report from a custom source
138
+ Librato.measure 'api.response.time', time, source: node_name
136
139
  ```
137
140
 
138
141
  The block form auto-submits the time it took for its contents to execute as the measurement value:
@@ -143,6 +146,22 @@ Librato.timing 'twitter.lookup.time' do
143
146
  end
144
147
  ```
145
148
 
149
+ ###### percentiles (beta)
150
+
151
+ By defaults timings will send the average, sum, max and min for every minute. If you want to send percentiles as well you can specify them inline while instrumenting:
152
+
153
+ # track a single percentile
154
+ Librato.timing 'api.request.time', time, percentile: 95
155
+
156
+ # track multiple percentiles
157
+ Librato.timing 'api.request.time', time, percentile: [95, 99]
158
+
159
+ You can also use percentiles with the block form of timings:
160
+
161
+ Librato.timing 'my.important.event', percentile: 95 do
162
+ # do work
163
+ end
164
+
146
165
  #### group
147
166
 
148
167
  There is also a grouping helper, to make managing nested metrics easier. So this:
@@ -169,7 +188,7 @@ Symbols can be used interchangably with strings for metric names.
169
188
 
170
189
  `librato-rails` also has special helpers which are available inside your controllers:
171
190
 
172
- #### instrument_action
191
+ #### instrument_action (experimental)
173
192
 
174
193
  Use when you want to profile execution time or request volume for a specific controller action:
175
194
 
@@ -242,6 +261,10 @@ These are just a few examples. Combining `ActiveSupport::Notifications` instrume
242
261
 
243
262
  You can set an optional prefix to all metrics reported by `librato-rails` in your [configuration](https://github.com/librato/librato-rails/wiki/Configuration). This can be helpful for isolating test data or forcing different apps to use different metric names.
244
263
 
264
+ ## Tracking Deploys
265
+
266
+ It can be very useful to track your deploys using [annotations](http://dev.librato.com/v1/annotations) so you can use them to monitor the impact of changes to your app. Take a look at the [librato-rake-deploytrack gem](https://github.com/Jimdo/librato-rake-deploytrack) for an easy install option or [this ticket](https://github.com/librato/librato-rails/issues/41#issuecomment-50595104) for examples of how you can write your own.
267
+
245
268
  ## Use with Background Workers / Cron Jobs
246
269
 
247
270
  `librato-rails` is designed to run within a long-running process and report periodically. Intermittently running rake tasks and most background job tools (delayed job, resque, queue_classic) don't run long enough for this to work.
@@ -26,13 +26,13 @@ module Librato
26
26
  collector.group "rails.request" do |r|
27
27
 
28
28
  r.increment 'total'
29
- r.timing 'time', event.duration
29
+ r.timing 'time', event.duration, percentile: 95
30
30
 
31
31
  if exception
32
32
  r.increment 'exceptions'
33
33
  else
34
- r.timing 'time.db', event.payload[:db_runtime] || 0
35
- r.timing 'time.view', event.payload[:view_runtime] || 0
34
+ r.timing 'time.db', event.payload[:db_runtime] || 0, percentile: 95
35
+ r.timing 'time.view', event.payload[:view_runtime] || 0, percentile: 95
36
36
  end
37
37
 
38
38
  if http_method
@@ -61,13 +61,13 @@ module Librato
61
61
 
62
62
  r.increment 'total', source: source
63
63
  r.increment 'slow', source: source if event.duration > 200.0
64
- r.timing 'time', event.duration, source: source
64
+ r.timing 'time', event.duration, source: source, percentile: 95
65
65
 
66
66
  if exception
67
67
  r.increment 'exceptions', source: source
68
68
  else
69
- r.timing 'time.db', event.payload[:db_runtime] || 0, source: source
70
- r.timing 'time.view', event.payload[:view_runtime] || 0, source: source
69
+ r.timing 'time.db', event.payload[:db_runtime] || 0, source: source, percentile: 95
70
+ r.timing 'time.view', event.payload[:view_runtime] || 0, source: source, percentile: 95
71
71
  end
72
72
 
73
73
  end
@@ -1,5 +1,5 @@
1
1
  module Librato
2
2
  module Rails
3
- VERSION = "0.11.1"
3
+ VERSION = "0.12.0.beta"
4
4
  end
5
5
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: librato-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.1
4
+ version: 0.12.0.beta
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Sanders
@@ -10,26 +10,27 @@ bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIDNjCCAh6gAwIBAgIBADANBgkqhkiG9w0BAQUFADBBMREwDwYDVQQDDAhydWJ5
14
- Z2VtczEXMBUGCgmSJomT8ixkARkWB2xpYnJhdG8xEzARBgoJkiaJk/IsZAEZFgNj
15
- b20wHhcNMTMwODA4MjIxOTQ2WhcNMTQwODA4MjIxOTQ2WjBBMREwDwYDVQQDDAhy
16
- dWJ5Z2VtczEXMBUGCgmSJomT8ixkARkWB2xpYnJ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1u5/LcIw/ZJ+7sXVYmMCgDIjdZ+p7VVwq
31
+ aqIKyXbNfJC+dTit
31
32
  -----END CERTIFICATE-----
32
- date: 2014-07-09 00:00:00.000000000 Z
33
+ date: 2015-09-03 00:00:00.000000000 Z
33
34
  dependencies:
34
35
  - !ruby/object:Gem::Dependency
35
36
  name: railties
@@ -63,16 +64,16 @@ dependencies:
63
64
  name: librato-rack
64
65
  requirement: !ruby/object:Gem::Requirement
65
66
  requirements:
66
- - - "~>"
67
+ - - '='
67
68
  - !ruby/object:Gem::Version
68
- version: 0.4.2
69
+ version: 0.5.0.beta
69
70
  type: :runtime
70
71
  prerelease: false
71
72
  version_requirements: !ruby/object:Gem::Requirement
72
73
  requirements:
73
- - - "~>"
74
+ - - '='
74
75
  - !ruby/object:Gem::Version
75
- version: 0.4.2
76
+ version: 0.5.0.beta
76
77
  - !ruby/object:Gem::Dependency
77
78
  name: sqlite3
78
79
  requirement: !ruby/object:Gem::Requirement
@@ -224,9 +225,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
224
225
  version: '0'
225
226
  required_rubygems_version: !ruby/object:Gem::Requirement
226
227
  requirements:
227
- - - ">="
228
+ - - ">"
228
229
  - !ruby/object:Gem::Version
229
- version: '0'
230
+ version: 1.3.1
230
231
  requirements: []
231
232
  rubyforge_project:
232
233
  rubygems_version: 2.2.2
metadata.gz.sig CHANGED
Binary file