oboe-heroku 0.9.17.3 → 0.9.17.4

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: 44fb09878a1844337597bbd10291f887293e3558
4
- data.tar.gz: 8a251a5e9e3c1c52396726c9671ab2c5ad3fc1fd
3
+ metadata.gz: 3c91e362bef82bc73ca272c0c58ff1e3b5cd34bf
4
+ data.tar.gz: e759d1afabd1393c399ed6a4b5274779df880dcf
5
5
  SHA512:
6
- metadata.gz: 1f4752f07ae1be38a7283fd77e37c573d89745422b561cc18aead3dad60f1d4d0dd46529bf5ee96ee48995265e8e292ca1184ad1f2516e34b5c1600024361d94
7
- data.tar.gz: 5d38de87fdcf816d9f1bff92fb63beb29c05d7e69ed9ba4c5b6a87e11326aa7ebf459ad0e8689987e4f960dbc1c7bc0498fbc21c85ed1521cb7d04908ba0ffb0
6
+ metadata.gz: a01d74e37e4a503831328d1897ab21a81d4660c22d2ffd1b5f5f1fdbf31fde8da2534c20c790965cfffff77233b4a985fc1d8f6e5edefda654f1c1444e96b097
7
+ data.tar.gz: d5a683440d9a113fa47c7554fe86c5141046a083d6850cc4401e7436d3e7f3d881e45a0982a994fcfce010b1bfd5ab9389109ec495dba72db40770bd293a3a6e
data/lib/oboe-heroku.rb CHANGED
@@ -9,7 +9,7 @@ begin
9
9
 
10
10
  # TRACEVIEW_URL env var is standard with the Heroku addon. We
11
11
  # use it to determine if we are actually running in Heroku or not.
12
- if ENV.key?('TRACEVIEW_URL')
12
+ if ENV.key?('TRACEVIEW_URL') and (($0 =~ /rake$/i) == nil)
13
13
 
14
14
  require 'oboe_metal.so'
15
15
  require 'heroku_metal'
@@ -33,6 +33,7 @@ module OboeBase
33
33
  attr_accessor :loaded
34
34
  attr_accessor :sample_source
35
35
  attr_accessor :sample_rate
36
+ thread_local :layer
36
37
  thread_local :layer_op
37
38
 
38
39
  # The following accessors indicate the incoming tracing state received
@@ -99,6 +100,17 @@ module OboeBase
99
100
  end
100
101
  end
101
102
 
103
+ ##
104
+ # tracing_layer?
105
+ #
106
+ # Queries the thread local variable about the current
107
+ # layer being traced. This is used in cases of recursive
108
+ # operation tracing or one instrumented operation calling another.
109
+ #
110
+ def tracing_layer?(layer)
111
+ return Oboe.layer == layer
112
+ end
113
+
102
114
  ##
103
115
  # tracing_layer_op?
104
116
  #
@@ -206,4 +218,3 @@ end
206
218
  module Oboe
207
219
  extend OboeBase
208
220
  end
209
-
@@ -3,7 +3,7 @@ module OboeHeroku
3
3
  MAJOR = 0
4
4
  MINOR = 9
5
5
  PATCH = 17
6
- BUILD = 3
6
+ BUILD = 4
7
7
 
8
8
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
9
9
  end
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.3
4
+ version: 0.9.17.4
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-12-03 00:00:00.000000000 Z
12
+ date: 2014-12-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: oboe