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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +3 -0
- data/README.md +5 -1
- data/lib/librato/rails/railtie.rb +13 -11
- data/lib/librato/rails/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ce2ae4e1528ebaf9d1a0530a44b359732605e58
|
4
|
+
data.tar.gz: 651bd515fba4f8c855f7a7f192fa983ff8be48bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 303a719b828e20520f08a3bc6bada5383cf2abf5a9c557862e50b6a31e9b089be404442ea701b9c8ae039ff59a433c578582ce81346fc8a87f37584699720e05
|
7
|
+
data.tar.gz: fba27e56efb1cf238d145ea1bce403b8a23988905290b3e8486c74a05ab41c7bff3ea7b1c316ffc8272bde3367bb825ce3bdfd8dca2830972c33641cda8687d9
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
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
|
-
|
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
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
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
|
|
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.
|
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:
|
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
|