scout_apm 1.6.6 → 1.6.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.markdown +4 -0
- data/lib/scout_apm/instruments/mongoid.rb +6 -5
- data/lib/scout_apm/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51e6646411ef8e7e03434c2c4680a468fb1c5735
|
4
|
+
data.tar.gz: f79cd89522151be528c1076d5fc65b2abdd62f66
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b893c84366f77e64c74d8b84d7c4a20a625358d52bd6b600fefbf807fc35bf2aa8e27fc12c032bc4f4a23b76d713cb575ff0b521388c39ae5f728e94cb2d9717
|
7
|
+
data.tar.gz: 420ee003c01b6f2c7b7f0c7c15001f6acd501a7d6dcbaa47ced8e4f27dff5195c6e265975fdd625aaae16811cf75de6aafb98a9660ee28639c9494f0c4ac8405
|
data/CHANGELOG.markdown
CHANGED
@@ -17,7 +17,7 @@ module ScoutApm
|
|
17
17
|
|
18
18
|
# Mongoid versions that use Moped should instrument Moped.
|
19
19
|
if defined?(::Mongoid) and !defined?(::Moped)
|
20
|
-
ScoutApm::Agent.instance.logger.info "Instrumenting Mongoid"
|
20
|
+
ScoutApm::Agent.instance.logger.info "Instrumenting Mongoid 2.x"
|
21
21
|
|
22
22
|
### OLD (2.x) mongoids
|
23
23
|
if defined?(::Mongoid::Collection)
|
@@ -33,6 +33,7 @@ module ScoutApm
|
|
33
33
|
|
34
34
|
### 5.x Mongoid
|
35
35
|
if mongoid_v5? && defined?(::Mongoid::Contextual::Mongo)
|
36
|
+
ScoutApm::Agent.instance.logger.info "Instrumenting Mongoid 5.x"
|
36
37
|
# All the public methods from Mongoid::Contextual::Mongo.
|
37
38
|
# TODO: Geo and MapReduce support (?). They are in other Contextual::* classes
|
38
39
|
methods = [
|
@@ -46,8 +47,8 @@ module ScoutApm
|
|
46
47
|
|
47
48
|
methods.each do |method|
|
48
49
|
if ::Mongoid::Contextual::Mongo.method_defined?(method)
|
49
|
-
with_scout_instruments = %Q
|
50
|
-
def #{method}_with_scout_instruments(*args)
|
50
|
+
with_scout_instruments = %Q[
|
51
|
+
def #{method}_with_scout_instruments(*args, &block)
|
51
52
|
|
52
53
|
req = ScoutApm::RequestManager.lookup
|
53
54
|
*db, collection = view.collection.namespace.split(".")
|
@@ -60,7 +61,7 @@ module ScoutApm
|
|
60
61
|
|
61
62
|
req.start_layer( layer )
|
62
63
|
begin
|
63
|
-
#{method}_without_scout_instruments
|
64
|
+
#{method}_without_scout_instruments(*args, &block)
|
64
65
|
ensure
|
65
66
|
req.stop_layer
|
66
67
|
end
|
@@ -68,7 +69,7 @@ module ScoutApm
|
|
68
69
|
|
69
70
|
alias_method :#{method}_without_scout_instruments, :#{method}
|
70
71
|
alias_method :#{method}, :#{method}_with_scout_instruments
|
71
|
-
|
72
|
+
]
|
72
73
|
|
73
74
|
::Mongoid::Contextual::Mongo.class_eval(with_scout_instruments)
|
74
75
|
end
|
data/lib/scout_apm/version.rb
CHANGED
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: 1.6.
|
4
|
+
version: 1.6.7
|
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: 2016-07-
|
12
|
+
date: 2016-07-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: minitest
|