skylight 0.3.20 → 0.3.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/skylight.rb +1 -1
- data/lib/skylight/instrumenter.rb +13 -2
- data/lib/skylight/railtie.rb +4 -2
- data/lib/skylight/version.rb +1 -1
- data/lib/skylight/worker/collector.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1cf63055157626891e0d09101b21221a4d18406f
|
4
|
+
data.tar.gz: df489cf0c01303baf4ea5636c4fbcf40f30fa690
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7537c8005076587637aad255183d13755ea45b746ce331635990bb18f6e12a52b73394720b62370f34eb1e8f361284ab29e6dce13ba552c820110fa2e84584e8
|
7
|
+
data.tar.gz: 29e0bfbd08c39ad41c426afafb717dd84483ea1beda96710ee9bcc7abc1694a4f20ab3544d3cf26dfe7f028eca174d4ad8ffa6381ffabe3343477190fa3d6e72
|
data/CHANGELOG.md
CHANGED
data/lib/skylight.rb
CHANGED
@@ -62,7 +62,7 @@ module Skylight
|
|
62
62
|
config.alert_logger.warn \
|
63
63
|
"[SKYLIGHT] [#{Skylight::VERSION}] Running Skylight in #{env_name} mode. " \
|
64
64
|
"No data will be reported until you deploy your app.\n" \
|
65
|
-
"(To disable this message, set `
|
65
|
+
"(To disable this message, set `alert_log_file` in your config.)"
|
66
66
|
else
|
67
67
|
config.alert_logger.error \
|
68
68
|
"[SKYLIGHT] [#{Skylight::VERSION}] The Skylight native extension for your platform wasn't found. " \
|
@@ -28,13 +28,24 @@ module Skylight
|
|
28
28
|
|
29
29
|
# Do start
|
30
30
|
# @param [Config] config The config
|
31
|
-
def self.start!(config =
|
31
|
+
def self.start!(config = nil)
|
32
32
|
return @instance if @instance
|
33
33
|
|
34
|
+
# Initialize here so we can catch errors
|
35
|
+
config ||= Config.new
|
36
|
+
|
34
37
|
LOCK.synchronize do
|
35
38
|
return @instance if @instance
|
36
39
|
@instance = new(config).start!
|
37
40
|
end
|
41
|
+
rescue => e
|
42
|
+
message = sprintf("[SKYLIGHT] [#{Skylight::VERSION}] Unable to start Instrumenter; msg=%s; class=%s", e.message, e.class)
|
43
|
+
if config
|
44
|
+
config.logger.warn message
|
45
|
+
else
|
46
|
+
warn message
|
47
|
+
end
|
48
|
+
false
|
38
49
|
end
|
39
50
|
|
40
51
|
def self.stop!
|
@@ -108,7 +119,7 @@ module Skylight
|
|
108
119
|
self
|
109
120
|
|
110
121
|
rescue Exception => e
|
111
|
-
log_error "failed to start instrumenter; msg=%s", e.message
|
122
|
+
log_error "failed to start instrumenter; msg=%s; config=%s", e.message, @config.inspect
|
112
123
|
nil
|
113
124
|
end
|
114
125
|
|
data/lib/skylight/railtie.rb
CHANGED
@@ -25,16 +25,18 @@ module Skylight
|
|
25
25
|
|
26
26
|
if activate?
|
27
27
|
if config
|
28
|
-
if
|
28
|
+
if Instrumenter.start!(config)
|
29
29
|
app.middleware.insert 0, Middleware, config: config
|
30
30
|
Rails.logger.info "[SKYLIGHT] [#{Skylight::VERSION}] Skylight agent enabled"
|
31
|
+
else
|
32
|
+
Rails.logger.info "[SKYLIGHT] [#{Skylight::VERSION}] Unable to start"
|
31
33
|
end
|
32
34
|
else
|
33
35
|
Rails.logger.warn "[SKYLIGHT] [#{Skylight::VERSION}] No configuration found; disabling Skylight agent"
|
34
36
|
end
|
35
37
|
elsif Rails.env.development?
|
36
38
|
log_warning config, "[SKYLIGHT] [#{Skylight::VERSION}] Running Skylight in development mode. No data will be reported until you deploy your app.\n" \
|
37
|
-
"(To disable this message, set `
|
39
|
+
"(To disable this message, set `alert_log_file` in your config.)"
|
38
40
|
elsif !Rails.env.test?
|
39
41
|
log_warning config, "[SKYLIGHT] [#{Skylight::VERSION}] You are running in the #{Rails.env} environment but haven't added it to config.skylight.environments, so no data will be sent to skylight.io."
|
40
42
|
end
|
data/lib/skylight/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: skylight
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tilde, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|