scout_apm 2.3.0.pre1 → 2.3.0.pre2

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: 87d20e596496af9d020ff073a6c0a6dd5f25989b
4
- data.tar.gz: 76a903858e591025ec82842c3f2a6d30a66f35fd
3
+ metadata.gz: 4554876f9ec9c7b93aa379cde4a00dd0adbdf1e7
4
+ data.tar.gz: 96a00005dd846304676a25568be464382dcb16eb
5
5
  SHA512:
6
- metadata.gz: d9733bb68af60c98eafddc3ad2d469173987214bc785e80deff2bd6f87161b1c256ca8cdc7b525656cae8bebe06332772b42a4896f624b1a70ca69882f26df1d
7
- data.tar.gz: e5a84284b84bb95bea7cbe7dda0bddfafc79e1180c833f8709d778cbbbc926d617c9f94f2a55dbf8870bd5869088bca8727227172823e7358d6b98617248a8ed
6
+ metadata.gz: 4f30c493a882edd86d1df9e0ecbb3afff859a92476a829466010cfdfaf154ae407bb64e1a29d5223b3f2ac4bfc9f1550e1f13363b08d451f293fefe7b70dd20a
7
+ data.tar.gz: 9a848973e69b1995ef393a1d16f2cb94bba5fc71d2e48fdd3ce6aa929283fd6a3c51e53728da9eb0409971bec2fd4444e3a7a33cfa5ce21ba55900340dbc843a
@@ -48,11 +48,16 @@ module ScoutApm
48
48
  end
49
49
  end
50
50
 
51
- if Utils::KlassHelper.defined?("ActiveRecord::Relation")
52
- ::ActiveRecord::Relation.class_eval do
53
- include ::ScoutApm::Instruments::ActiveRecordRelationInstruments
54
- end
55
- end
51
+ # Disabled until we can determine how to use Module#prepend in the
52
+ # agent. Otherwise, this will cause infinite loops if NewRelic is
53
+ # installed. We can't just use normal Module#include, since the
54
+ # original methods don't call super the way Base#save does
55
+ #
56
+ #if Utils::KlassHelper.defined?("ActiveRecord::Relation")
57
+ # ::ActiveRecord::Relation.class_eval do
58
+ # include ::ScoutApm::Instruments::ActiveRecordRelationInstruments
59
+ # end
60
+ #end
56
61
 
57
62
  if Utils::KlassHelper.defined?("ActiveRecord::Querying")
58
63
  ::ActiveRecord::Querying.module_eval do
@@ -222,23 +227,7 @@ module ScoutApm
222
227
  end
223
228
 
224
229
  module ActiveRecordUpdateInstruments
225
- def self.included(instrumented_class)
226
- ScoutApm::Agent.instance.logger.info "Instrumenting ActiveRecord Save: - #{instrumented_class.inspect}"
227
- instrumented_class.class_eval do
228
- unless instrumented_class.method_defined?(:save_without_scout_instruments)
229
- alias_method :save_without_scout_instruments, :save
230
- alias_method :save, :save_with_scout_instruments
231
- end
232
-
233
- unless instrumented_class.method_defined?(:"savebang_without_scout_instruments")
234
- alias_method :"savebang_without_scout_instruments", :"save!"
235
- alias_method :"save!", :"savebang_with_scout_instruments"
236
- end
237
- end
238
-
239
- end
240
-
241
- def savebang_with_scout_instruments(*args, &block)
230
+ def save(*args, &block)
242
231
  model = self.class.name
243
232
  operation = self.persisted? ? "Update" : "Create"
244
233
 
@@ -247,14 +236,14 @@ module ScoutApm
247
236
  req.start_layer(layer)
248
237
  req.ignore_children!
249
238
  begin
250
- savebang_without_scout_instruments(*args, &block)
239
+ super(*args, &block)
251
240
  ensure
252
241
  req.acknowledge_children!
253
242
  req.stop_layer
254
243
  end
255
244
  end
256
245
 
257
- def save_with_scout_instruments(*args, &block)
246
+ def save!(*args, &block)
258
247
  model = self.class.name
259
248
  operation = self.persisted? ? "Update" : "Create"
260
249
 
@@ -263,7 +252,7 @@ module ScoutApm
263
252
  req.start_layer(layer)
264
253
  req.ignore_children!
265
254
  begin
266
- save_without_scout_instruments(*args, &block)
255
+ super(*args, &block)
267
256
  ensure
268
257
  req.acknowledge_children!
269
258
  req.stop_layer
@@ -1,4 +1,4 @@
1
1
  module ScoutApm
2
- VERSION = "2.3.0.pre1"
2
+ VERSION = "2.3.0.pre2"
3
3
  end
4
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scout_apm
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0.pre1
4
+ version: 2.3.0.pre2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derek Haynes
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-09-28 00:00:00.000000000 Z
12
+ date: 2017-09-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: minitest