oboe-heroku 0.9.9.0 → 0.9.10.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: 1065da7d1a0f64f619796886b3878e12528b814a
4
- data.tar.gz: 7fa251e99d9f6e16672f73a27d6fa0231a10a6d5
3
+ metadata.gz: cbedf166a398ff97b329a3c9d84cccfbe5b501f6
4
+ data.tar.gz: 3e7f4fe19d939604ea339cc642f2cd3df56093b9
5
5
  SHA512:
6
- metadata.gz: af03f9c07f86dd002ebf19f6632dc3f16ade8d9ff9b628bb736d2f6c49aa32e0386b999303774b3570542e7ff23beab63d9ba12fb2ece01ecf63450140759738
7
- data.tar.gz: 525626a0924328b46272688aa8599b31d7692a75cfea579001a67209b9c58f464d35652fc294b8650a02f95106b6bcd62db89712c7555933b450f041e53a61f3
6
+ metadata.gz: 7455e21c7daea4d6609e81dc9a78cf35adf11ee8c9e13ad7de3a356a65ebf5c5ab6b99d600baa97f5fe859773fdf681443f0c23defcb3759810c936588ebd906
7
+ data.tar.gz: c528320394281553c0ba380856e8f02504db290579d681e9b40131887c5584680f3ac1d044a350409d42c8b9778300f340f5b4b726cc8c55ad740a113b0e0b6e
data/lib/base.rb CHANGED
@@ -63,7 +63,7 @@ module OboeBase
63
63
  end
64
64
 
65
65
  def forking_webserver?
66
- defined?(::Unicorn)
66
+ (defined?(::Unicorn) and ($0 =~ /unicorn/i)) ? true : false
67
67
  end
68
68
 
69
69
  ##
data/lib/heroku_metal.rb CHANGED
@@ -19,7 +19,7 @@ module Oboe_metal
19
19
 
20
20
  evt.addInfo("Backtrace", Oboe::API.backtrace) if with_backtrace
21
21
 
22
- Oboe.reporter.sendReport(evt)
22
+ Oboe.reporter.sendReport(evt) if Oboe.loaded
23
23
  end
24
24
 
25
25
  def tracing_layer_op?(operation)
@@ -44,15 +44,21 @@ module Oboe_metal
44
44
  #
45
45
  def self.start
46
46
  begin
47
+ return unless Oboe.loaded
48
+
49
+ if Oboe.reporter
50
+ Oboe.logger.warn "[oboe/warn] Attempt to start an already started reporter..."
51
+ return
52
+ end
53
+
47
54
  Oboe_metal::Context.init()
48
55
 
49
56
  Oboe.logger.debug "[oboe/debug] Initializing Heroku based reporter."
50
57
 
51
58
  # The Oboe Reporter is configured via Heroku config variables.
52
59
  Oboe.reporter = Oboe::Reporter.new(nil, nil)
53
-
54
- Oboe::API.report_init
55
60
 
61
+ Oboe::API.report_init
56
62
  rescue Exception => e
57
63
  $stderr.puts e.message
58
64
  raise
@@ -60,7 +66,7 @@ module Oboe_metal
60
66
  end
61
67
 
62
68
  def self.sendReport(evt)
63
- Oboe.reporter.sendReport(evt)
69
+ Oboe.reporter.sendReport(evt) if Oboe.loaded
64
70
  end
65
71
  end
66
72
  end
@@ -2,7 +2,7 @@ module OboeHeroku
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 9
5
- PATCH = 9
5
+ PATCH = 10
6
6
  BUILD = 0
7
7
 
8
8
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
data/lib/oboe-heroku.rb CHANGED
@@ -2,13 +2,17 @@
2
2
  # All rights reserved.
3
3
 
4
4
  begin
5
- if ENV.has_key?('TRACEVIEW_URL')
5
+ # TRACEVIEW_URL env var is standard with the Heroku addon. We
6
+ # use it to determine if we are actually running in Heroku or not.
7
+ if ENV.has_key?('TRACEVIEW_URL') and ENV['RAILS_GROUP'] != 'assets'
6
8
  begin
7
9
  require 'heroku_metal'
8
10
  require 'oboe_metal.so'
9
11
  rescue LoadError => e
12
+ Oboe.loaded = false
13
+
10
14
  if ENV.has_key?('TRACEVIEW_DEBUG_LEVEL') and (ENV['TRACEVIEW_DEBUG_LEVEL'].to_i > 1)
11
- $stderr.puts "[oboe-heroku/error] Could not load oboe-heroku dependencies: #{e.message}"
15
+ $stderr.puts "[oboe-heroku/error] Could not load all dependencies: #{e.message}"
12
16
  $stderr.puts e.backtrace.join("\n")
13
17
  end
14
18
  end
@@ -19,10 +23,14 @@ begin
19
23
  # Require the core oboe gem
20
24
  require 'oboe'
21
25
 
22
- ::OboeHeroku::Loading.configure
26
+ ::OboeHeroku::Loading.configure if Oboe.loaded
23
27
  end
24
28
  rescue Exception => e
29
+ Oboe.loaded = false
30
+
25
31
  $stderr.puts "[oboe-heroku/error] Problem loading: #{e.message}"
26
- $stderr.puts e.backtrace.join("\n")
32
+ if ENV.has_key?('TRACEVIEW_DEBUG_LEVEL') and (ENV['TRACEVIEW_DEBUG_LEVEL'].to_i > 1)
33
+ $stderr.puts e.backtrace.join("\n")
34
+ end
27
35
  end
28
36
 
data/oboe-heroku.gemspec CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
20
20
 
21
21
  s.extensions = ['ext/oboe_metal/extconf.rb']
22
22
 
23
- s.add_dependency(%q<oboe>, [">= 2.6.1.0"])
23
+ s.add_dependency(%q<oboe>, [">= 2.6.2.0"])
24
24
 
25
25
  s.add_development_dependency 'rake'
26
26
  s.add_development_dependency 'rspec'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oboe-heroku
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.9.0
4
+ version: 0.9.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Giacomo Lombardo
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-03-12 00:00:00.000000000 Z
12
+ date: 2014-03-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: oboe
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - '>='
19
19
  - !ruby/object:Gem::Version
20
- version: 2.6.1.0
20
+ version: 2.6.2.0
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - '>='
26
26
  - !ruby/object:Gem::Version
27
- version: 2.6.1.0
27
+ version: 2.6.2.0
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rake
30
30
  requirement: !ruby/object:Gem::Requirement