scout_apm 0.1.6 → 0.1.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.rb +48 -23
- data/lib/scout_apm/agent.rb +93 -130
- data/lib/scout_apm/agent/reporting.rb +34 -63
- data/lib/scout_apm/app_server_load.rb +29 -0
- data/lib/scout_apm/background_worker.rb +6 -6
- data/lib/scout_apm/capacity.rb +48 -48
- data/lib/scout_apm/config.rb +5 -5
- data/lib/scout_apm/context.rb +3 -3
- data/lib/scout_apm/environment.rb +64 -100
- data/lib/scout_apm/framework_integrations/rails_2.rb +32 -0
- data/lib/scout_apm/framework_integrations/rails_3_or_4.rb +33 -0
- data/lib/scout_apm/framework_integrations/ruby.rb +26 -0
- data/lib/scout_apm/framework_integrations/sinatra.rb +27 -0
- data/lib/scout_apm/instruments/active_record_instruments.rb +1 -1
- data/lib/scout_apm/instruments/mongoid_instruments.rb +1 -1
- data/lib/scout_apm/instruments/moped_instruments.rb +3 -3
- data/lib/scout_apm/instruments/net_http.rb +2 -2
- data/lib/scout_apm/instruments/process/process_cpu.rb +41 -20
- data/lib/scout_apm/instruments/process/process_memory.rb +45 -30
- data/lib/scout_apm/instruments/rails/action_controller_instruments.rb +20 -18
- data/lib/scout_apm/instruments/rails3_or_4/action_controller_instruments.rb +17 -14
- data/lib/scout_apm/layaway.rb +12 -12
- data/lib/scout_apm/layaway_file.rb +1 -1
- data/lib/scout_apm/metric_meta.rb +9 -9
- data/lib/scout_apm/metric_stats.rb +8 -8
- data/lib/scout_apm/reporter.rb +83 -0
- data/lib/scout_apm/serializers/app_server_load_serializer.rb +15 -0
- data/lib/scout_apm/serializers/directive_serializer.rb +15 -0
- data/lib/scout_apm/serializers/payload_serializer.rb +14 -0
- data/lib/scout_apm/server_integrations/null.rb +30 -0
- data/lib/scout_apm/server_integrations/passenger.rb +35 -0
- data/lib/scout_apm/server_integrations/puma.rb +30 -0
- data/lib/scout_apm/server_integrations/rainbows.rb +36 -0
- data/lib/scout_apm/server_integrations/thin.rb +41 -0
- data/lib/scout_apm/server_integrations/unicorn.rb +35 -0
- data/lib/scout_apm/server_integrations/webrick.rb +25 -0
- data/lib/scout_apm/slow_transaction.rb +3 -3
- data/lib/scout_apm/stack_item.rb +19 -17
- data/lib/scout_apm/store.rb +35 -35
- data/lib/scout_apm/tracer.rb +121 -110
- data/lib/scout_apm/utils/sql_sanitizer.rb +2 -2
- data/lib/scout_apm/version.rb +2 -1
- data/test/unit/environment_test.rb +5 -5
- metadata +18 -2
@@ -5,7 +5,7 @@ require 'scout_apm/environment'
|
|
5
5
|
module ScoutApm
|
6
6
|
module Utils
|
7
7
|
class SqlSanitizer
|
8
|
-
if ScoutApm::Environment.
|
8
|
+
if ScoutApm::Environment.instance.ruby_187?
|
9
9
|
require 'scout_apm/utils/sql_sanitizer_regex_1_8_7'
|
10
10
|
else
|
11
11
|
require 'scout_apm/utils/sql_sanitizer_regex'
|
@@ -17,7 +17,7 @@ module ScoutApm
|
|
17
17
|
|
18
18
|
def initialize(sql)
|
19
19
|
@sql = sql.dup
|
20
|
-
@database_engine = ScoutApm::Environment.
|
20
|
+
@database_engine = ScoutApm::Environment.instance.database_engine
|
21
21
|
end
|
22
22
|
|
23
23
|
def to_s
|
data/lib/scout_apm/version.rb
CHANGED
@@ -10,24 +10,24 @@ class EnvironmentTest < Minitest::Test
|
|
10
10
|
|
11
11
|
def test_framework_rails
|
12
12
|
fake_rails(2)
|
13
|
-
assert_equal :rails, ScoutApm::Environment.new.framework
|
13
|
+
assert_equal :rails, ScoutApm::Environment.send(:new).framework
|
14
14
|
|
15
15
|
clean_fake_rails
|
16
16
|
fake_rails(3)
|
17
|
-
assert_equal :rails3_or_4, ScoutApm::Environment.new.framework
|
17
|
+
assert_equal :rails3_or_4, ScoutApm::Environment.send(:new).framework
|
18
18
|
|
19
19
|
clean_fake_rails
|
20
20
|
fake_rails(4)
|
21
|
-
assert_equal :rails3_or_4, ScoutApm::Environment.new.framework
|
21
|
+
assert_equal :rails3_or_4, ScoutApm::Environment.send(:new).framework
|
22
22
|
end
|
23
23
|
|
24
24
|
def test_framework_sinatra
|
25
25
|
fake_sinatra
|
26
|
-
assert_equal :sinatra, ScoutApm::Environment.new.framework
|
26
|
+
assert_equal :sinatra, ScoutApm::Environment.send(:new).framework
|
27
27
|
end
|
28
28
|
|
29
29
|
def test_framework_ruby
|
30
|
-
assert_equal :ruby, ScoutApm::Environment.new.framework
|
30
|
+
assert_equal :ruby, ScoutApm::Environment.send(:new).framework
|
31
31
|
end
|
32
32
|
|
33
33
|
############################################################
|
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: 0.1.
|
4
|
+
version: 0.1.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: 2015-08-
|
12
|
+
date: 2015-08-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: minitest
|
@@ -70,11 +70,16 @@ files:
|
|
70
70
|
- lib/scout_apm/agent.rb
|
71
71
|
- lib/scout_apm/agent/logging.rb
|
72
72
|
- lib/scout_apm/agent/reporting.rb
|
73
|
+
- lib/scout_apm/app_server_load.rb
|
73
74
|
- lib/scout_apm/background_worker.rb
|
74
75
|
- lib/scout_apm/capacity.rb
|
75
76
|
- lib/scout_apm/config.rb
|
76
77
|
- lib/scout_apm/context.rb
|
77
78
|
- lib/scout_apm/environment.rb
|
79
|
+
- lib/scout_apm/framework_integrations/rails_2.rb
|
80
|
+
- lib/scout_apm/framework_integrations/rails_3_or_4.rb
|
81
|
+
- lib/scout_apm/framework_integrations/ruby.rb
|
82
|
+
- lib/scout_apm/framework_integrations/sinatra.rb
|
78
83
|
- lib/scout_apm/instruments/active_record_instruments.rb
|
79
84
|
- lib/scout_apm/instruments/mongoid_instruments.rb
|
80
85
|
- lib/scout_apm/instruments/moped_instruments.rb
|
@@ -87,6 +92,17 @@ files:
|
|
87
92
|
- lib/scout_apm/layaway_file.rb
|
88
93
|
- lib/scout_apm/metric_meta.rb
|
89
94
|
- lib/scout_apm/metric_stats.rb
|
95
|
+
- lib/scout_apm/reporter.rb
|
96
|
+
- lib/scout_apm/serializers/app_server_load_serializer.rb
|
97
|
+
- lib/scout_apm/serializers/directive_serializer.rb
|
98
|
+
- lib/scout_apm/serializers/payload_serializer.rb
|
99
|
+
- lib/scout_apm/server_integrations/null.rb
|
100
|
+
- lib/scout_apm/server_integrations/passenger.rb
|
101
|
+
- lib/scout_apm/server_integrations/puma.rb
|
102
|
+
- lib/scout_apm/server_integrations/rainbows.rb
|
103
|
+
- lib/scout_apm/server_integrations/thin.rb
|
104
|
+
- lib/scout_apm/server_integrations/unicorn.rb
|
105
|
+
- lib/scout_apm/server_integrations/webrick.rb
|
90
106
|
- lib/scout_apm/slow_transaction.rb
|
91
107
|
- lib/scout_apm/stack_item.rb
|
92
108
|
- lib/scout_apm/store.rb
|