scout_apm 0.9.4.pre1 → 0.9.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.markdown +6 -0
- data/lib/scout_apm/agent.rb +5 -0
- data/lib/scout_apm/framework_integrations/rails_3_or_4.rb +19 -12
- data/lib/scout_apm/instruments/net_http.rb +0 -2
- data/lib/scout_apm/reporter.rb +1 -1
- data/lib/scout_apm/version.rb +1 -1
- metadata +15 -23
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 7965070352dba0abdf13aaa1087cbc1b29335ebb
|
4
|
+
data.tar.gz: c0344b576001fb07bdbc52808bb889dc295e6360
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 51b1343c212b9261615ec66ef6ca20f1da2dbb978f15bf7d56ba164c945b1d5194fcd4cefc99e736c44b06ad53495ddbffb8255904f6f89452fcd967662b911b
|
7
|
+
data.tar.gz: 970d9858a92a5929f66288561e209ad997ffc4b0afff2b2d11256cae4836e50571f1539337f15ed4fa33cf348f0bf25e753a7ce1b4d65c29ae480feffe170729
|
data/CHANGELOG.markdown
CHANGED
data/lib/scout_apm/agent.rb
CHANGED
@@ -36,24 +36,31 @@ module ScoutApm
|
|
36
36
|
default = :mysql
|
37
37
|
|
38
38
|
if defined?(ActiveRecord::Base)
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
end
|
49
|
-
else
|
50
|
-
default
|
39
|
+
adapter = getDatabaseAdapter # can be nil
|
40
|
+
|
41
|
+
case adapter.to_s
|
42
|
+
when "postgres" then :postgres
|
43
|
+
when "postgresql" then :postgres
|
44
|
+
when "postgis" then :postgres
|
45
|
+
when "sqlite3" then :sqlite
|
46
|
+
when "mysql" then :mysql
|
47
|
+
else default
|
51
48
|
end
|
52
49
|
else
|
53
50
|
# TODO: Figure out how to detect outside of Rails context. (sequel, ROM, etc)
|
54
51
|
default
|
55
52
|
end
|
56
53
|
end
|
54
|
+
|
55
|
+
def getDatabaseAdapter
|
56
|
+
if ActiveRecord::Base.respond_to?(:connection_config)
|
57
|
+
ActiveRecord::Base.connection_config[:adapter]
|
58
|
+
elsif ActiveRecord::Base.respond_to?(:configurations)
|
59
|
+
ActiveRecord::Base.configurations[env]["adapter"]
|
60
|
+
end
|
61
|
+
rescue
|
62
|
+
nil
|
63
|
+
end
|
57
64
|
end
|
58
65
|
end
|
59
66
|
end
|
@@ -25,8 +25,6 @@ module ScoutApm
|
|
25
25
|
self.class.instrument("HTTP/request", :desc => "#{(@address+args.first.path.split('?').first)[0..99]}") do
|
26
26
|
request_without_scout_instruments(*args,&block)
|
27
27
|
end
|
28
|
-
rescue SystemStackError => e
|
29
|
-
ScoutApm::Agent.instance.logger.error "Exception in Net::HTTP (#{self.class.to_s}): #{e.message}\nBacktrace: #{e.backtrace}\n\nCaller: #{caller.join("\n")}"
|
30
28
|
end
|
31
29
|
alias request_without_scout_instruments request
|
32
30
|
alias request request_with_scout_instruments
|
data/lib/scout_apm/reporter.rb
CHANGED
@@ -75,7 +75,7 @@ module ScoutApm
|
|
75
75
|
logger.debug "/#{type} FAILED: #{response.inspect}"
|
76
76
|
end
|
77
77
|
rescue Exception
|
78
|
-
logger.debug "Exception sending request to server: #{$!.message}\
|
78
|
+
logger.debug "Exception sending request to server: \n#{$!.message}\n\t#{$!.backtrace.join("\n\t")}"
|
79
79
|
ensure
|
80
80
|
response
|
81
81
|
end
|
data/lib/scout_apm/version.rb
CHANGED
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scout_apm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.4
|
5
|
-
prerelease: 6
|
4
|
+
version: 0.9.4
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Derek Haynes
|
@@ -10,54 +9,48 @@ authors:
|
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date: 2015-10-
|
12
|
+
date: 2015-10-27 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: minitest
|
17
16
|
requirement: !ruby/object:Gem::Requirement
|
18
|
-
none: false
|
19
17
|
requirements:
|
20
|
-
- -
|
18
|
+
- - ">="
|
21
19
|
- !ruby/object:Gem::Version
|
22
20
|
version: '0'
|
23
21
|
type: :development
|
24
22
|
prerelease: false
|
25
23
|
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
24
|
requirements:
|
28
|
-
- -
|
25
|
+
- - ">="
|
29
26
|
- !ruby/object:Gem::Version
|
30
27
|
version: '0'
|
31
28
|
- !ruby/object:Gem::Dependency
|
32
29
|
name: pry
|
33
30
|
requirement: !ruby/object:Gem::Requirement
|
34
|
-
none: false
|
35
31
|
requirements:
|
36
|
-
- -
|
32
|
+
- - ">="
|
37
33
|
- !ruby/object:Gem::Version
|
38
34
|
version: '0'
|
39
35
|
type: :development
|
40
36
|
prerelease: false
|
41
37
|
version_requirements: !ruby/object:Gem::Requirement
|
42
|
-
none: false
|
43
38
|
requirements:
|
44
|
-
- -
|
39
|
+
- - ">="
|
45
40
|
- !ruby/object:Gem::Version
|
46
41
|
version: '0'
|
47
42
|
- !ruby/object:Gem::Dependency
|
48
43
|
name: m
|
49
44
|
requirement: !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
51
45
|
requirements:
|
52
|
-
- -
|
46
|
+
- - ">="
|
53
47
|
- !ruby/object:Gem::Version
|
54
48
|
version: '0'
|
55
49
|
type: :development
|
56
50
|
prerelease: false
|
57
51
|
version_requirements: !ruby/object:Gem::Requirement
|
58
|
-
none: false
|
59
52
|
requirements:
|
60
|
-
- -
|
53
|
+
- - ">="
|
61
54
|
- !ruby/object:Gem::Version
|
62
55
|
version: '0'
|
63
56
|
description: Monitors Ruby apps and reports detailed metrics on performance to Scout.
|
@@ -67,7 +60,7 @@ executables: []
|
|
67
60
|
extensions: []
|
68
61
|
extra_rdoc_files: []
|
69
62
|
files:
|
70
|
-
- .gitignore
|
63
|
+
- ".gitignore"
|
71
64
|
- CHANGELOG.markdown
|
72
65
|
- Gemfile
|
73
66
|
- README.markdown
|
@@ -139,28 +132,27 @@ files:
|
|
139
132
|
- test/unit/sql_sanitizer_test.rb
|
140
133
|
homepage: https://github.com/scoutapp/scout_apm_ruby
|
141
134
|
licenses: []
|
135
|
+
metadata: {}
|
142
136
|
post_install_message:
|
143
137
|
rdoc_options: []
|
144
138
|
require_paths:
|
145
139
|
- lib
|
146
140
|
- data
|
147
141
|
required_ruby_version: !ruby/object:Gem::Requirement
|
148
|
-
none: false
|
149
142
|
requirements:
|
150
|
-
- -
|
143
|
+
- - ">="
|
151
144
|
- !ruby/object:Gem::Version
|
152
145
|
version: '0'
|
153
146
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
154
|
-
none: false
|
155
147
|
requirements:
|
156
|
-
- -
|
148
|
+
- - ">="
|
157
149
|
- !ruby/object:Gem::Version
|
158
|
-
version:
|
150
|
+
version: '0'
|
159
151
|
requirements: []
|
160
152
|
rubyforge_project: scout_apm
|
161
|
-
rubygems_version:
|
153
|
+
rubygems_version: 2.2.2
|
162
154
|
signing_key:
|
163
|
-
specification_version:
|
155
|
+
specification_version: 4
|
164
156
|
summary: Ruby application performance monitoring
|
165
157
|
test_files:
|
166
158
|
- test/data/config_test_1.yml
|