oboe-heroku 0.9.17.8 → 0.9.18.1

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: 10a4fdece58a3dfd1118d6f5e7ecf2a3c96c9660
4
- data.tar.gz: 9fc13b8e1daf90aebb19c76a58b8b2184167c84d
3
+ metadata.gz: d0b5aa56d9294c1017ea792dd38e0c0bbcc60a93
4
+ data.tar.gz: 9321069644aa674865087019ea31123e3ce3bd7e
5
5
  SHA512:
6
- metadata.gz: aa3e0b46571bc2552906e3e04c67e7643d248f9a2facdfbbdcb1a3740142baa469b533a8053b989147c98a57abb6bf8715975b60592a3b520907854a18438400
7
- data.tar.gz: 27bf470697791d254b776730cbd2f5930e841690759f23d0f0f299273809ff03b5fac848f77ed3c666a0944152df04f9f085ae963aef1a1dbd3a6052cf5deceb
6
+ metadata.gz: 1ae617bbad4e0f3e4ca7972774cc855eec7c0ed373805fa77f17047de42623b540f5a6f74d582ecb724646305463c2bee3282d9c5cf5f504bbf372ad493af248
7
+ data.tar.gz: f977fb67e8d5f9243eeb6ab9f6754464837153cf2eb01ce886ecacae0945adea49768a28e071ba2f5ccd3f64416a0262194fb633989dd8d2e7e45e9dc9117a2b
data/lib/heroku_metal.rb CHANGED
@@ -33,7 +33,16 @@ module Oboe
33
33
  end
34
34
 
35
35
  def self.sendReport(evt)
36
- Oboe.reporter.sendReport(evt) if Oboe.loaded
36
+ if Oboe.loaded
37
+ # In the case of the SSL reporter (Heroku) and forking
38
+ # webservers, we don't start the reporter until we need
39
+ # it.
40
+ if !Oboe.reporter
41
+ Oboe::Reporter.start
42
+ end
43
+
44
+ Oboe.reporter.sendReport(evt)
45
+ end
37
46
  end
38
47
  end
39
48
 
@@ -104,12 +113,17 @@ module Oboe
104
113
  # such as Unicorn or Passenger
105
114
  #
106
115
  def disconnect!
107
- # To avoid an issue with SSL reconnects, delay Reporter initialization
108
- # until after the fork is completed. Here, do nothing for now.
116
+ # Since we moved to delayed SSL reporter initialization for forking
117
+ # webservers with preload_app!, these ops now do nothing.
118
+ # We keep them here for users that already have these calls in
119
+ # their apps (before/after fork) and in case we want to use them again.
109
120
  end
110
121
 
111
122
  def reconnect!
112
- Oboe::Reporter.start
123
+ # Since we moved to delayed SSL reporter initialization for forking
124
+ # webservers with preload_app!, these ops now do nothing.
125
+ # We keep them here for users that already have these calls in
126
+ # their apps (before/after fork) and in case we want to use them again.
113
127
  end
114
128
  end
115
129
  end
data/lib/oboe-heroku.rb CHANGED
@@ -23,10 +23,10 @@ begin
23
23
  ::OboeHeroku::Loading.configure if Oboe.loaded
24
24
  end
25
25
  rescue LoadError => e
26
- $stderr.puts "[oboe-heroku/error] Failed to load support libs: #{e.message}"
27
26
  Oboe.loaded = false
28
27
 
29
28
  if ENV.has_key?('TRACEVIEW_DEBUG_LEVEL') and (ENV['TRACEVIEW_DEBUG_LEVEL'].to_i > 1)
29
+ $stderr.puts "[oboe-heroku/error] Failed to load support libs: #{e.message}"
30
30
  $stderr.puts e.backtrace.join("\n")
31
31
  end
32
32
  rescue Exception => e
@@ -31,8 +31,8 @@ module OboeBase
31
31
 
32
32
  attr_accessor :reporter
33
33
  attr_accessor :loaded
34
- attr_accessor :sample_source
35
- attr_accessor :sample_rate
34
+ thread_local :sample_source
35
+ thread_local :sample_rate
36
36
  thread_local :layer
37
37
  thread_local :layer_op
38
38
 
@@ -183,7 +183,12 @@ module OboeBase
183
183
  # Determines if we are running under a forking webserver
184
184
  #
185
185
  def forking_webserver?
186
- (defined?(::Unicorn) && ($PROGRAM_NAME =~ /unicorn/i)) ? true : false
186
+ if (defined?(::Unicorn) && ($PROGRAM_NAME =~ /unicorn/i)) ||
187
+ (defined?(::Puma) && ($PROGRAM_NAME =~ /puma/i))
188
+ true
189
+ else
190
+ false
191
+ end
187
192
  end
188
193
 
189
194
  ##
@@ -2,8 +2,8 @@ module OboeHeroku
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 9
5
- PATCH = 17
6
- BUILD = 8
5
+ PATCH = 18
6
+ BUILD = 1
7
7
 
8
8
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
9
9
  end
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.7.8.1"])
23
+ s.add_dependency(%q<oboe>, [">= 2.7.14.1"])
24
24
 
25
25
  s.add_development_dependency 'rake', '>= 0'
26
26
 
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.17.8
4
+ version: 0.9.18.1
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: 2015-01-09 00:00:00.000000000 Z
12
+ date: 2015-03-21 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.7.8.1
20
+ version: 2.7.14.1
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.7.8.1
27
+ version: 2.7.14.1
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rake
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
106
  version: '0'
107
107
  requirements: []
108
108
  rubyforge_project:
109
- rubygems_version: 2.2.2
109
+ rubygems_version: 2.4.5
110
110
  signing_key:
111
111
  specification_version: 4
112
112
  summary: AppNeta TraceView performance instrumentation gem for the Heroku platform