oboe 2.7.3.1 → 2.7.4.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: fbc50cdddd9e7790092bf3e84cca5d8988ee9633
4
- data.tar.gz: 160f3513d1a91a51de4d8bdccfe303fd330aa0f7
3
+ metadata.gz: 252963036ab61953b873cbd86fc07eaeb42b1b07
4
+ data.tar.gz: 2385bcb4b3d56f42cb7f0a255e339c9a9f998f59
5
5
  SHA512:
6
- metadata.gz: c23d3238a1c61373284bccb94b3d4cd1e142698f4b56eb1c5733d0ad85ab582fb033a6fbec4fbe2c17d9cd32e34e77ead98c60c090a479723cdc10527aea43ea
7
- data.tar.gz: 7227d4cae655da310878116c8226984e8c1cae232b69972c62f06085b99d438f036314311e9af5a5d053a2871000797dce0ae291c4d26ffc3f8c2d10ed93d90a
6
+ metadata.gz: 4692130035aace8a2bcbd42a8c865abe1ed9636fba5db142bef0cf395b066ad7b86a645335d21c63a5fae9c37d6604aebf46cb711dd65001942a18474dff7d9c
7
+ data.tar.gz: 5fa46e4de898c01918014c81ea0550647f7a0b12a18272894ede7c1feb07ae0f148dede11f36f5c2273d62d5ef8bc2d6ed7af36e0090d9c4e3405f0345621929
@@ -35,9 +35,9 @@ begin
35
35
  end
36
36
 
37
37
  require 'oboe/config'
38
+ require 'oboe/loading'
38
39
 
39
40
  if Oboe.loaded
40
- require 'oboe/loading'
41
41
  require 'oboe/method_profiling'
42
42
  require 'oboe/instrumentation'
43
43
 
@@ -22,7 +22,9 @@ module Oboe
22
22
  #
23
23
  # Returns nothing.
24
24
  def log(layer, label, opts = {})
25
- log_event(layer, label, Oboe::Context.createEvent, opts)
25
+ if Oboe.loaded
26
+ log_event(layer, label, Oboe::Context.createEvent, opts)
27
+ end
26
28
  end
27
29
 
28
30
  # Public: Report an exception.
@@ -41,7 +43,7 @@ module Oboe
41
43
  #
42
44
  # Returns nothing.
43
45
  def log_exception(layer, exn)
44
- return if exn.instance_variable_get(:@oboe_logged)
46
+ return if !Oboe.loaded || exn.instance_variable_get(:@oboe_logged)
45
47
 
46
48
  kvs = { :ErrorClass => exn.class.name,
47
49
  :Message => exn.message,
@@ -61,7 +63,8 @@ module Oboe
61
63
  #
62
64
  # Returns nothing.
63
65
  def log_start(layer, xtrace, opts = {})
64
- return if Oboe.never? || (opts.key?(:URL) && ::Oboe::Util.static_asset?(opts[:URL]))
66
+ return if !Oboe.loaded || Oboe.never? ||
67
+ (opts.key?(:URL) && ::Oboe::Util.static_asset?(opts[:URL]))
65
68
 
66
69
  Oboe::Context.fromString(xtrace) if xtrace && !xtrace.to_s.empty?
67
70
 
@@ -78,10 +81,12 @@ module Oboe
78
81
  #
79
82
  # Returns an xtrace metadata string
80
83
  def log_end(layer, opts = {})
81
- log_event(layer, 'exit', Oboe::Context.createEvent, opts)
82
- xtrace = Oboe::Context.toString
83
- Oboe::Context.clear
84
- xtrace
84
+ if Oboe.loaded
85
+ log_event(layer, 'exit', Oboe::Context.createEvent, opts)
86
+ xtrace = Oboe::Context.toString
87
+ Oboe::Context.clear
88
+ xtrace
89
+ end
85
90
  end
86
91
 
87
92
  ##
@@ -92,8 +97,10 @@ module Oboe
92
97
  #
93
98
  # Returns an xtrace metadata string
94
99
  def log_entry(layer, kvs = {}, op = nil)
95
- Oboe.layer_op = op if op
96
- log_event(layer, 'entry', Oboe::Context.createEvent, kvs)
100
+ if Oboe.loaded
101
+ Oboe.layer_op = op if op
102
+ log_event(layer, 'entry', Oboe::Context.createEvent, kvs)
103
+ end
97
104
  end
98
105
 
99
106
  ##
@@ -104,7 +111,9 @@ module Oboe
104
111
  #
105
112
  # Returns an xtrace metadata string
106
113
  def log_info(layer, kvs = {})
107
- log_event(layer, 'info', Oboe::Context.createEvent, kvs)
114
+ if Oboe.loaded
115
+ log_event(layer, 'info', Oboe::Context.createEvent, kvs)
116
+ end
108
117
  end
109
118
 
110
119
  ##
@@ -115,8 +124,10 @@ module Oboe
115
124
  #
116
125
  # Returns an xtrace metadata string
117
126
  def log_exit(layer, kvs = {}, op = nil)
118
- Oboe.layer_op = nil if op
119
- log_event(layer, 'exit', Oboe::Context.createEvent, kvs)
127
+ if Oboe.loaded
128
+ Oboe.layer_op = nil if op
129
+ log_event(layer, 'exit', Oboe::Context.createEvent, kvs)
130
+ end
120
131
  end
121
132
 
122
133
  # Internal: Report an event.
@@ -137,14 +148,16 @@ module Oboe
137
148
  #
138
149
  # Returns nothing.
139
150
  def log_event(layer, label, event, opts = {})
140
- event.addInfo('Layer', layer.to_s) if layer
141
- event.addInfo('Label', label.to_s)
151
+ if Oboe.loaded
152
+ event.addInfo('Layer', layer.to_s) if layer
153
+ event.addInfo('Label', label.to_s)
142
154
 
143
- opts.each do |k, v|
144
- event.addInfo(k.to_s, v.to_s) if valid_key? k
145
- end if !opts.nil? && opts.any?
155
+ opts.each do |k, v|
156
+ event.addInfo(k.to_s, v.to_s) if valid_key? k
157
+ end if !opts.nil? && opts.any?
146
158
 
147
- Oboe::Reporter.sendReport(event) if Oboe.loaded
159
+ Oboe::Reporter.sendReport(event) if Oboe.loaded
160
+ end
148
161
  end
149
162
  end
150
163
  end
@@ -90,5 +90,5 @@ Oboe::Loading.require_api
90
90
  # Auto-start the Reporter unless we running Unicorn on Heroku
91
91
  # In that case, we start the reporters after fork
92
92
  unless Oboe.heroku? && Oboe.forking_webserver?
93
- Oboe::Reporter.start
93
+ Oboe::Reporter.start if Oboe.loaded
94
94
  end
@@ -1,6 +1,8 @@
1
1
  # Copyright (c) 2014 AppNeta, Inc.
2
2
  # All rights reserved.
3
3
 
4
+ require 'rbconfig'
5
+
4
6
  module Oboe
5
7
  ##
6
8
  # This module is used to debug problematic setups and/or environments.
@@ -74,14 +76,31 @@ module Oboe
74
76
  }
75
77
  end
76
78
 
79
+ Oboe.logger.warn "********************************************************"
80
+ Oboe.logger.warn "* Oboe::Config Values"
81
+ Oboe.logger.warn "********************************************************"
82
+ Oboe::Config.show.each { |k,v|
83
+ Oboe.logger.warn "#{k}: #{v}"
84
+ }
85
+
86
+ Oboe.logger.warn "********************************************************"
87
+ Oboe.logger.warn "* OS, Platform + Env"
88
+ Oboe.logger.warn "********************************************************"
89
+ Oboe.logger.warn RbConfig::CONFIG['host_os']
90
+ Oboe.logger.warn RbConfig::CONFIG['sitearch']
91
+ Oboe.logger.warn RbConfig::CONFIG['arch']
92
+ Oboe.logger.warn RUBY_PLATFORM
93
+ Oboe.logger.warn "RACK_ENV: #{ENV['RACK_ENV']}"
94
+ Oboe.logger.warn "RAILS_ENV: #{ENV['RAILS_ENV']}" if using_rails
95
+
77
96
  Oboe.logger.warn "********************************************************"
78
97
  Oboe.logger.warn "* Raw __Init KVs"
79
98
  Oboe.logger.warn "********************************************************"
80
- platform_info = Oboe::Util.build_report
99
+ platform_info = Oboe::Util.build_init_report
81
100
  platform_info.each { |k,v|
82
101
  Oboe.logger.warn "#{k}: #{v}"
83
102
  }
84
-
103
+
85
104
  Oboe.logger.warn "********************************************************"
86
105
  Oboe.logger.warn "* END TraceView Support Report"
87
106
  Oboe.logger.warn "* Support Email: traceviewsupport@appneta.com"
@@ -8,7 +8,7 @@ module Oboe
8
8
  module Version
9
9
  MAJOR = 2
10
10
  MINOR = 7
11
- PATCH = 3
11
+ PATCH = 4
12
12
  BUILD = 1
13
13
 
14
14
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oboe
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.3.1
4
+ version: 2.7.4.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: 2014-10-15 00:00:00.000000000 Z
12
+ date: 2014-10-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json