skylight 0.3.20 → 0.3.21

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b4753335500fc79c83707c6022d126ff56277629
4
- data.tar.gz: 738b3feeb6ab06e25317f6d2978530437cff41d2
3
+ metadata.gz: 1cf63055157626891e0d09101b21221a4d18406f
4
+ data.tar.gz: df489cf0c01303baf4ea5636c4fbcf40f30fa690
5
5
  SHA512:
6
- metadata.gz: 309981c22e1a0db6a1f63d616fde5ba902e5f2f626f028bd100eb155ab4567239a3a3b6ec954f9f12565aa2d7f3b317de42b4de7c7d6fda00f9f00a200ded4c0
7
- data.tar.gz: 3fe913784d4cf625a65215b94b13b5d4479cce6c2ff0a3c28b86cbe35343fd9b2c8037c2d86567357de3f09e26c0d88020381e83c10fc2bdd5f1cab222bd894f
6
+ metadata.gz: 7537c8005076587637aad255183d13755ea45b746ce331635990bb18f6e12a52b73394720b62370f34eb1e8f361284ab29e6dce13ba552c820110fa2e84584e8
7
+ data.tar.gz: 29e0bfbd08c39ad41c426afafb717dd84483ea1beda96710ee9bcc7abc1694a4f20ab3544d3cf26dfe7f028eca174d4ad8ffa6381ffabe3343477190fa3d6e72
@@ -1,3 +1,7 @@
1
+ ## 0.3.21 (October 8, 2014)
2
+
3
+ * [BUGFIX] Skylight crashing on start won't crash entire app
4
+
1
5
  ## 0.3.20 (September 3, 2014)
2
6
 
3
7
  * [BUGFIX] Fix app name fetching on Windows for `skylight setup`
@@ -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 `alert_logger_file` in your config.)"
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 = Config.new)
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
 
@@ -25,16 +25,18 @@ module Skylight
25
25
 
26
26
  if activate?
27
27
  if config
28
- if config && Instrumenter.start!(config)
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 `alert_logger_file` in your config.)"
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
@@ -1,4 +1,4 @@
1
1
  module Skylight
2
- VERSION = '0.3.20'
2
+ VERSION = '0.3.21'
3
3
  end
4
4
 
@@ -185,7 +185,7 @@ module Skylight
185
185
 
186
186
  if tok && expires_at
187
187
  if expires_at <= now
188
- error "token is expired: token=%s; expires_at=%s"
188
+ error "token is expired: token=%s; expires_at=%s", tok, expires_at
189
189
  return
190
190
  end
191
191
 
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.20
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-09-03 00:00:00.000000000 Z
11
+ date: 2014-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport