librato-rails 1.1.0 → 1.2.0

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: 73a0fd7ad647e0379f586f2b4a778a5c54495a60
4
- data.tar.gz: 1223465e8df2b70617841e879af5b9823a2bd8e6
3
+ metadata.gz: 0ce2ae4e1528ebaf9d1a0530a44b359732605e58
4
+ data.tar.gz: 651bd515fba4f8c855f7a7f192fa983ff8be48bf
5
5
  SHA512:
6
- metadata.gz: 995dde4f0230b4a36bf789ab5a72b2dc2550265b8c1af3d37014af0663cd9f4c4a8219168612f5d51dece8a5ccfadef161934a2774ab60d259767aa6d4a7049f
7
- data.tar.gz: baf97745b36a3a66cebe8edd48664b23352456e13888a35bb03839825ec9c8d768f40b6f807d431cb3cd7224e6753fcfaa3e85a6f2ea0cc285035fb7f04073e2
6
+ metadata.gz: 303a719b828e20520f08a3bc6bada5383cf2abf5a9c557862e50b6a31e9b089be404442ea701b9c8ae039ff59a433c578582ce81346fc8a87f37584699720e05
7
+ data.tar.gz: fba27e56efb1cf238d145ea1bce403b8a23988905290b3e8486c74a05ab41c7bff3ea7b1c316ffc8272bde3367bb825ce3bdfd8dca2830972c33641cda8687d9
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ### Version 1.2.0
2
+ * Allow use of Rails.application.secrets in the librato.yaml (Zack Siri)
3
+
1
4
  ### Version 1.1.0
2
5
  * Add HTTP proxy support
3
6
 
data/README.md CHANGED
@@ -11,6 +11,8 @@ Verified combinations of Ruby/Rails are available in our [build matrix](http://t
11
11
 
12
12
  ## Quick Start
13
13
 
14
+ >Note: If you have not yet enabled Rails on the [Librato integrations page](https://metrics.librato.com/integrations) within your account, do this first. This will automatically set up a Rails and Rack Space, displaying many useful performance metrics.
15
+
14
16
  Installing `librato-rails` and relaunching your application will automatically start the reporting of metrics to your Librato account.
15
17
 
16
18
  After installation `librato-rails` will detect your environment and start reporting available performance information for your application.
@@ -76,7 +78,9 @@ If you are using a config file, add your source entry to that instead.
76
78
 
77
79
  Full information on configuration options is available on the [configuration wiki page](https://github.com/librato/librato-rails/wiki/Configuration).
78
80
 
79
- Note that if Heroku idles your application measurements will not be sent until it receives another request and is restarted. If you see intermittent gaps in your measurements during periods of low traffic this is the most likely cause.
81
+ If Heroku idles your application, measurements will not be sent until it receives another request and is restarted. If you see intermittent gaps in your measurements during periods of low traffic, this is the most likely cause.
82
+
83
+ Please note that a Paid Plan is required for tracking Custom Metrics in Heroku. Choose a Librato add-on plan here (https://elements.heroku.com/addons/librato#pricing).
80
84
 
81
85
  ## Automatic Measurements
82
86
 
@@ -5,13 +5,15 @@ module Librato
5
5
  # don't have any custom http vars anymore, check if hostname is UUID
6
6
  on_heroku = Socket.gethostname =~ /[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}/i
7
7
 
8
- # make configuration proxy for config inside Rails
9
- config.librato_rails = Configuration.new
10
-
11
- # set up tracker
12
- tracker = Tracker.new(config.librato_rails)
13
- config.librato_rails.tracker = tracker
14
- Librato.register_tracker(tracker)
8
+ config.before_configuration do
9
+ # make configuration proxy for config inside Rails
10
+ config.librato_rails = Configuration.new
11
+
12
+ # set up tracker
13
+ tracker = Tracker.new(config.librato_rails)
14
+ config.librato_rails.tracker = tracker
15
+ Librato.register_tracker(tracker)
16
+ end
15
17
 
16
18
  initializer 'librato_rails.setup' do |app|
17
19
 
@@ -28,12 +30,12 @@ module Librato
28
30
  logger = ::Rails.logger
29
31
  end
30
32
  config.librato_rails.log_target = logger
31
- tracker.log(:debug) { "config: #{config.librato_rails.dump}" }
33
+ config.librato_rails.tracker.log(:debug) { "config: #{config.librato_rails.dump}" }
32
34
 
33
- if tracker.should_start?
34
- tracker.log :info, "starting up (pid #{$$}, using #{config.librato_rails.config_by})..."
35
+ if config.librato_rails.tracker.should_start?
36
+ config.librato_rails.tracker.log :info, "starting up (pid #{$$}, using #{config.librato_rails.config_by})..."
35
37
  app.middleware.insert(0, Librato::Rack, :config => config.librato_rails)
36
- tracker.check_worker if config.librato_rails.autorun
38
+ config.librato_rails.tracker.check_worker if config.librato_rails.autorun
37
39
  end
38
40
  end
39
41
 
@@ -1,5 +1,5 @@
1
1
  module Librato
2
2
  module Rails
3
- VERSION = "1.1.0"
3
+ VERSION = "1.2.0"
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: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Sanders
@@ -29,7 +29,7 @@ cert_chain:
29
29
  hvjx0WJP8pzZMJPKJBRZQXJO5ifEPyKjZyMi5XMHmrtDclHLj3sx4RAvEZjGWkRP
30
30
  JSQ=
31
31
  -----END CERTIFICATE-----
32
- date: 2015-12-14 00:00:00.000000000 Z
32
+ date: 2016-03-09 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: railties
metadata.gz.sig CHANGED
Binary file