scout_apm 2.2.0.pre3 → 2.3.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -1
  3. data/CHANGELOG.markdown +147 -2
  4. data/Guardfile +43 -0
  5. data/Rakefile +2 -2
  6. data/ext/allocations/allocations.c +6 -0
  7. data/ext/allocations/extconf.rb +1 -0
  8. data/ext/rusage/README.md +26 -0
  9. data/ext/rusage/extconf.rb +5 -0
  10. data/ext/rusage/rusage.c +52 -0
  11. data/lib/scout_apm.rb +28 -15
  12. data/lib/scout_apm/agent.rb +89 -37
  13. data/lib/scout_apm/agent/logging.rb +6 -1
  14. data/lib/scout_apm/agent/reporting.rb +9 -6
  15. data/lib/scout_apm/app_server_load.rb +21 -10
  16. data/lib/scout_apm/attribute_arranger.rb +6 -3
  17. data/lib/scout_apm/background_job_integrations/delayed_job.rb +71 -1
  18. data/lib/scout_apm/background_job_integrations/resque.rb +85 -0
  19. data/lib/scout_apm/background_job_integrations/sidekiq.rb +22 -20
  20. data/lib/scout_apm/background_recorder.rb +43 -0
  21. data/lib/scout_apm/background_worker.rb +19 -15
  22. data/lib/scout_apm/config.rb +138 -28
  23. data/lib/scout_apm/db_query_metric_set.rb +80 -0
  24. data/lib/scout_apm/db_query_metric_stats.rb +102 -0
  25. data/lib/scout_apm/debug.rb +37 -0
  26. data/lib/scout_apm/environment.rb +22 -15
  27. data/lib/scout_apm/git_revision.rb +51 -0
  28. data/lib/scout_apm/histogram.rb +11 -2
  29. data/lib/scout_apm/instant/assets/xmlhttp_instrumentation.html +2 -2
  30. data/lib/scout_apm/instant/middleware.rb +196 -54
  31. data/lib/scout_apm/instruments/action_controller_rails_3_rails4.rb +89 -68
  32. data/lib/scout_apm/instruments/action_view.rb +49 -0
  33. data/lib/scout_apm/instruments/active_record.rb +127 -3
  34. data/lib/scout_apm/instruments/grape.rb +4 -3
  35. data/lib/scout_apm/instruments/middleware_detailed.rb +4 -6
  36. data/lib/scout_apm/instruments/mongoid.rb +24 -3
  37. data/lib/scout_apm/instruments/net_http.rb +7 -2
  38. data/lib/scout_apm/instruments/percentile_sampler.rb +36 -19
  39. data/lib/scout_apm/instruments/process/process_cpu.rb +3 -2
  40. data/lib/scout_apm/instruments/process/process_memory.rb +3 -3
  41. data/lib/scout_apm/instruments/resque.rb +40 -0
  42. data/lib/scout_apm/layaway.rb +67 -28
  43. data/lib/scout_apm/layer.rb +19 -59
  44. data/lib/scout_apm/layer_children_set.rb +77 -0
  45. data/lib/scout_apm/layer_converters/allocation_metric_converter.rb +5 -6
  46. data/lib/scout_apm/layer_converters/converter_base.rb +201 -14
  47. data/lib/scout_apm/layer_converters/database_converter.rb +55 -0
  48. data/lib/scout_apm/layer_converters/depth_first_walker.rb +22 -10
  49. data/lib/scout_apm/layer_converters/error_converter.rb +5 -7
  50. data/lib/scout_apm/layer_converters/find_layer_by_type.rb +34 -0
  51. data/lib/scout_apm/layer_converters/histograms.rb +14 -0
  52. data/lib/scout_apm/layer_converters/job_converter.rb +36 -50
  53. data/lib/scout_apm/layer_converters/metric_converter.rb +17 -19
  54. data/lib/scout_apm/layer_converters/request_queue_time_converter.rb +10 -12
  55. data/lib/scout_apm/layer_converters/slow_job_converter.rb +41 -115
  56. data/lib/scout_apm/layer_converters/slow_request_converter.rb +33 -117
  57. data/lib/scout_apm/limited_layer.rb +126 -0
  58. data/lib/scout_apm/metric_meta.rb +0 -5
  59. data/lib/scout_apm/metric_set.rb +9 -1
  60. data/lib/scout_apm/metric_stats.rb +7 -8
  61. data/lib/scout_apm/rack.rb +26 -0
  62. data/lib/scout_apm/remote/message.rb +23 -0
  63. data/lib/scout_apm/remote/recorder.rb +57 -0
  64. data/lib/scout_apm/remote/router.rb +49 -0
  65. data/lib/scout_apm/remote/server.rb +58 -0
  66. data/lib/scout_apm/reporter.rb +51 -15
  67. data/lib/scout_apm/request_histograms.rb +4 -0
  68. data/lib/scout_apm/request_manager.rb +2 -1
  69. data/lib/scout_apm/scored_item_set.rb +7 -0
  70. data/lib/scout_apm/serializers/db_query_serializer_to_json.rb +15 -0
  71. data/lib/scout_apm/serializers/histograms_serializer_to_json.rb +21 -0
  72. data/lib/scout_apm/serializers/payload_serializer.rb +10 -3
  73. data/lib/scout_apm/serializers/payload_serializer_to_json.rb +6 -6
  74. data/lib/scout_apm/serializers/slow_jobs_serializer_to_json.rb +2 -1
  75. data/lib/scout_apm/server_integrations/puma.rb +5 -2
  76. data/lib/scout_apm/slow_job_policy.rb +1 -10
  77. data/lib/scout_apm/slow_job_record.rb +6 -1
  78. data/lib/scout_apm/slow_request_policy.rb +1 -10
  79. data/lib/scout_apm/slow_transaction.rb +20 -2
  80. data/lib/scout_apm/store.rb +66 -12
  81. data/lib/scout_apm/synchronous_recorder.rb +26 -0
  82. data/lib/scout_apm/tracked_request.rb +136 -71
  83. data/lib/scout_apm/utils/active_record_metric_name.rb +8 -4
  84. data/lib/scout_apm/utils/backtrace_parser.rb +3 -3
  85. data/lib/scout_apm/utils/gzip_helper.rb +24 -0
  86. data/lib/scout_apm/utils/numbers.rb +14 -0
  87. data/lib/scout_apm/utils/scm.rb +14 -0
  88. data/lib/scout_apm/version.rb +1 -1
  89. data/scout_apm.gemspec +5 -4
  90. data/test/test_helper.rb +18 -0
  91. data/test/unit/config_test.rb +59 -8
  92. data/test/unit/db_query_metric_set_test.rb +56 -0
  93. data/test/unit/db_query_metric_stats_test.rb +113 -0
  94. data/test/unit/git_revision_test.rb +15 -0
  95. data/test/unit/histogram_test.rb +14 -0
  96. data/test/unit/instruments/net_http_test.rb +21 -0
  97. data/test/unit/instruments/percentile_sampler_test.rb +137 -0
  98. data/test/unit/layaway_test.rb +20 -0
  99. data/test/unit/layer_children_set_test.rb +88 -0
  100. data/test/unit/layer_converters/depth_first_walker_test.rb +66 -0
  101. data/test/unit/layer_converters/metric_converter_test.rb +22 -0
  102. data/test/unit/layer_converters/stubs.rb +33 -0
  103. data/test/unit/limited_layer_test.rb +53 -0
  104. data/test/unit/remote/test_message.rb +13 -0
  105. data/test/unit/remote/test_router.rb +33 -0
  106. data/test/unit/remote/test_server.rb +15 -0
  107. data/test/unit/serializers/payload_serializer_test.rb +3 -12
  108. data/test/unit/store_test.rb +66 -0
  109. data/test/unit/test_tracked_request.rb +87 -0
  110. data/test/unit/utils/active_record_metric_name_test.rb +8 -0
  111. data/test/unit/utils/backtrace_parser_test.rb +5 -0
  112. data/test/unit/utils/numbers_test.rb +15 -0
  113. data/test/unit/utils/scm.rb +17 -0
  114. metadata +125 -30
  115. data/ext/stacks/extconf.rb +0 -37
  116. data/ext/stacks/scout_atomics.h +0 -86
  117. data/ext/stacks/stacks.c +0 -811
  118. data/lib/scout_apm/capacity.rb +0 -57
  119. data/lib/scout_apm/deploy_integrations/capistrano_2.cap +0 -12
  120. data/lib/scout_apm/deploy_integrations/capistrano_2.rb +0 -83
  121. data/lib/scout_apm/deploy_integrations/capistrano_3.cap +0 -12
  122. data/lib/scout_apm/deploy_integrations/capistrano_3.rb +0 -88
  123. data/lib/scout_apm/instruments/delayed_job.rb +0 -57
  124. data/lib/scout_apm/serializers/deploy_serializer.rb +0 -16
  125. data/lib/scout_apm/trace_compactor.rb +0 -312
  126. data/lib/scout_apm/utils/fake_stacks.rb +0 -87
  127. data/tester.rb +0 -53
@@ -0,0 +1,13 @@
1
+ require 'test_helper'
2
+
3
+ class MessageTest < Minitest::Test
4
+ def test_message_encode_decode_roundtrip
5
+ message = ScoutApm::Remote::Message.new('type', 'command', ['arg'])
6
+ encoded = message.encode
7
+ decoded = ScoutApm::Remote::Message.decode(encoded)
8
+ assert_equal message.type, decoded.type
9
+ assert_equal message.command, decoded.command
10
+ assert_equal message.args, decoded.args
11
+ end
12
+ end
13
+
@@ -0,0 +1,33 @@
1
+ require 'test_helper'
2
+
3
+ class RouterTest < Minitest::Test
4
+ def test_router_handles_record
5
+ recorder = stub
6
+ router = ScoutApm::Remote::Router.new(recorder, logger)
7
+ message = ScoutApm::Remote::Message.new("record", "foo", 1, 2).encode
8
+
9
+ recorder.expects(:foo).with(1, 2)
10
+
11
+ router.handle(message)
12
+ end
13
+
14
+ def test_router_raises_on_unknown_types
15
+ recorder = stub
16
+ router = ScoutApm::Remote::Router.new(recorder, logger)
17
+ message = ScoutApm::Remote::Message.new("something_else", "foo", 1, 2).encode
18
+
19
+ recorder.expects(:foo).never
20
+ assert_raises do
21
+ router.handle(message)
22
+ end
23
+ end
24
+
25
+ def logger
26
+ @logger ||= Logger.new(logger_io)
27
+ end
28
+
29
+ def logger_io
30
+ @logger_io ||= StringIO.new
31
+ end
32
+ end
33
+
@@ -0,0 +1,15 @@
1
+ require 'test_helper'
2
+
3
+ class TestRemoteServer < Minitest::Test
4
+ def test_start_and_bind
5
+ bind = "127.0.0.1"
6
+ port = 8938
7
+ router = stub(:router)
8
+ logger_io = StringIO.new
9
+ server = ScoutApm::Remote::Server.new(bind, port, router, Logger.new(logger_io))
10
+
11
+ server.start
12
+ sleep 0.01 # Let the server finish starting. The assert should instead allow a time
13
+ assert server.running?
14
+ end
15
+ end
@@ -1,13 +1,4 @@
1
1
  require 'test_helper'
2
- require 'scout_apm/attribute_arranger'
3
- require 'scout_apm/bucket_name_splitter'
4
- require 'scout_apm/serializers/payload_serializer'
5
- require 'scout_apm/serializers/payload_serializer_to_json'
6
- require 'scout_apm/slow_transaction'
7
- require 'scout_apm/metric_meta'
8
- require 'scout_apm/metric_stats'
9
- require 'scout_apm/context'
10
- require 'ostruct'
11
2
  require 'json' # to deserialize what has been manually serialized by the production code
12
3
 
13
4
  class PayloadSerializerTest < Minitest::Test
@@ -17,7 +8,7 @@ class PayloadSerializerTest < Minitest::Test
17
8
  :unique_id => "unique_idz",
18
9
  :agent_version => 123
19
10
  }
20
- payload = ScoutApm::Serializers::PayloadSerializerToJson.serialize(metadata, {}, {}, [], [])
11
+ payload = ScoutApm::Serializers::PayloadSerializerToJson.serialize(metadata, {}, {}, [], [], [], {})
21
12
 
22
13
  # symbol keys turn to strings
23
14
  formatted_metadata = {
@@ -58,7 +49,7 @@ class PayloadSerializerTest < Minitest::Test
58
49
  stats.total_exclusive_time = 0.07813208899999999
59
50
  }
60
51
  }
61
- payload = ScoutApm::Serializers::PayloadSerializerToJson.serialize({}, metrics, {}, [], [])
52
+ payload = ScoutApm::Serializers::PayloadSerializerToJson.serialize({}, metrics, {}, [], [], [], {})
62
53
  formatted_metrics = [
63
54
  {
64
55
  "key" => {
@@ -102,7 +93,7 @@ class PayloadSerializerTest < Minitest::Test
102
93
  :quotie => "here are some \"quotes\"",
103
94
  :payload_version => 2,
104
95
  }
105
- payload = ScoutApm::Serializers::PayloadSerializerToJson.serialize(metadata, {}, {}, [], [])
96
+ payload = ScoutApm::Serializers::PayloadSerializerToJson.serialize(metadata, {}, {}, [], [], [], {})
106
97
 
107
98
  # symbol keys turn to strings
108
99
  formatted_metadata = {
@@ -20,4 +20,70 @@ class StoreTest < Minitest::Test
20
20
 
21
21
  assert_equal({}, s.reporting_periods)
22
22
  end
23
+
24
+ def test_writing_layaway_removes_stale_timestamps
25
+ current_time = Time.now.utc
26
+ current_rp = ScoutApm::StoreReportingPeriod.new(current_time)
27
+ stale_rp = ScoutApm::StoreReportingPeriod.new(current_time - current_time.sec - 120)
28
+
29
+ s = ScoutApm::Store.new
30
+ ScoutApm::Instruments::Process::ProcessMemory.new(Logger.new(StringIO.new)).metrics(stale_rp.timestamp, s)
31
+ ScoutApm::Instruments::Process::ProcessMemory.new(Logger.new(StringIO.new)).metrics(current_rp.timestamp, s)
32
+ assert_equal 2, s.reporting_periods.size
33
+
34
+ s.write_to_layaway(FakeFailingLayaway.new, true)
35
+
36
+ assert_equal({}, s.reporting_periods)
37
+ end
38
+ end
39
+
40
+ class StoreReportingPeriodTest < Minitest::Test
41
+ HistogramReport = ScoutApm::Instruments::HistogramReport
42
+
43
+ attr_reader :subject
44
+
45
+ def setup
46
+ @subject = ScoutApm::StoreReportingPeriod.new(ScoutApm::StoreReportingPeriodTimestamp.new)
47
+ end
48
+
49
+ # Check default values at creation time
50
+ def test_empty_values
51
+ assert_equal [], subject.histograms
52
+ assert_equal ScoutApm::ScoredItemSet.new, subject.request_traces
53
+ assert_equal ScoutApm::ScoredItemSet.new, subject.job_traces
54
+ assert_equal ScoutApm::MetricSet.new, subject.metric_set
55
+ end
56
+
57
+ def test_merge_histograms
58
+ histogramFoo1 = histogram
59
+ histogramFoo2 = histogram
60
+ histogramBar1 = histogram
61
+ histogramBar2 = histogram
62
+
63
+ # This assertion may be fragile to reordering in the merge_histograms! function.
64
+ histogramFoo1.expects(:combine!).with(histogramFoo2)
65
+ histogramBar1.expects(:combine!).with(histogramBar2)
66
+
67
+ subject.merge_histograms!([
68
+ HistogramReport.new("foo", histogramFoo1),
69
+ HistogramReport.new("bar", histogramBar1),
70
+ ])
71
+
72
+ subject.merge_histograms!([
73
+ HistogramReport.new("foo", histogramFoo2),
74
+ HistogramReport.new("bar", histogramBar2),
75
+ ])
76
+
77
+ result = subject.histograms
78
+ assert_equal 2, result.length
79
+ assert_equal ["bar", "foo"], result.map(&:name).sort
80
+ end
81
+
82
+ ###############################################################################
83
+ # Helpers
84
+ ###############################################################################
85
+ def histogram
86
+ max_bins = 20
87
+ ScoutApm::NumericHistogram.new(max_bins)
88
+ end
23
89
  end
@@ -0,0 +1,87 @@
1
+ require 'test_helper'
2
+
3
+ class TrackedRequestDumpAndLoadTest < Minitest::Test
4
+ # TrackedRequest must be marshalable
5
+ def test_marshal_dump_load
6
+ tr = ScoutApm::TrackedRequest.new(ScoutApm::FakeStore.new)
7
+ tr.prepare_to_dump!
8
+
9
+ dumped = Marshal.dump(tr)
10
+ loaded = Marshal.load(dumped)
11
+ assert_false loaded.nil?
12
+ end
13
+
14
+ def test_restore_store
15
+ faux = ScoutApm::FakeStore.new
16
+ tr = ScoutApm::TrackedRequest.new(faux)
17
+ assert_equal faux, tr.instance_variable_get("@store")
18
+
19
+ tr.prepare_to_dump!
20
+ assert_nil tr.instance_variable_get("@store")
21
+
22
+ tr.restore_store
23
+ assert_equal ScoutApm::Agent.instance.store, tr.instance_variable_get("@store")
24
+ end
25
+ end
26
+
27
+ class TrackedRequestFlagsTest < Minitest::Test
28
+ def test_set_web
29
+ tr = ScoutApm::TrackedRequest.new(ScoutApm::FakeStore.new)
30
+ assert_false tr.web?
31
+ tr.web!
32
+ assert tr.web?
33
+ end
34
+
35
+ def test_set_job
36
+ tr = ScoutApm::TrackedRequest.new(ScoutApm::FakeStore.new)
37
+ assert ! tr.job?
38
+ tr.job!
39
+ assert tr.job?
40
+ end
41
+
42
+ def test_set_error
43
+ tr = ScoutApm::TrackedRequest.new(ScoutApm::FakeStore.new)
44
+ assert_false tr.error?
45
+ tr.error!
46
+ assert tr.error?
47
+ end
48
+
49
+ def test_set_error_and_web
50
+ tr = ScoutApm::TrackedRequest.new(ScoutApm::FakeStore.new)
51
+ assert_false tr.error?
52
+ assert_false tr.web?
53
+
54
+ tr.web!
55
+ assert_false tr.error?
56
+ assert tr.web?
57
+
58
+ tr.error!
59
+ assert tr.error?
60
+ assert tr.web?
61
+ end
62
+ end
63
+
64
+ class TrackedRequestLayerManipulationTest < Minitest::Test
65
+ def test_start_layer
66
+ tr = ScoutApm::TrackedRequest.new(ScoutApm::FakeStore.new)
67
+ tr.start_layer(ScoutApm::Layer.new("Foo", "Bar"))
68
+
69
+ assert_equal "Foo", tr.current_layer.type
70
+ end
71
+
72
+ def test_start_several_layers
73
+ # layers are Controller -> ActiveRecord
74
+ controller_layer = ScoutApm::Layer.new("Controller", "users/index")
75
+ ar_layer = ScoutApm::Layer.new("ActiveRecord", "Users#find")
76
+
77
+ tr = ScoutApm::TrackedRequest.new(ScoutApm::FakeStore.new)
78
+ tr.start_layer(controller_layer)
79
+ tr.start_layer(ar_layer)
80
+
81
+ assert_equal "ActiveRecord", tr.current_layer.type
82
+
83
+ tr.stop_layer
84
+
85
+ assert_equal "Controller", tr.current_layer.type
86
+ end
87
+ end
@@ -47,6 +47,14 @@ class ActiveRecordMetricNameTest < Minitest::Test
47
47
  assert_equal "SQL/Unknown", mn.to_s
48
48
  end
49
49
 
50
+ def test_with_sql_name
51
+ sql = %q|INSERT INTO "users".* VALUES (1,2,3)|
52
+ name = "SQL"
53
+
54
+ mn = ScoutApm::Utils::ActiveRecordMetricName.new(sql, name)
55
+ assert_equal "SQL/Unknown", mn.to_s
56
+ end
57
+
50
58
  # TODO: Determine if there should be a distinction between Unknown and Other.
51
59
  def test_with_custom_name
52
60
  sql = %q|SELECT "users".* FROM "users" /*application:Testapp,controller:public,action:index*/|
@@ -39,6 +39,11 @@ class BacktraceParserTest < Minitest::Test
39
39
  end
40
40
  end
41
41
 
42
+ def test_calls_scm_relative_path
43
+ ScoutApm::Utils::Scm.expects(:relative_scm_path).at_least_once
44
+ assert ScoutApm::Utils::BacktraceParser.new(raw_backtrace, root).call
45
+ end
46
+
42
47
  def test_works_on_shorter_backtraces
43
48
  result = ScoutApm::Utils::BacktraceParser.new(raw_backtrace(1), root).call
44
49
 
@@ -0,0 +1,15 @@
1
+ require_relative '../../test_helper'
2
+ require 'scout_apm/utils/numbers'
3
+
4
+ class NumbersTest < Minitest::Test
5
+ Numbers = ScoutApm::Utils::Numbers
6
+
7
+ def test_round
8
+ assert_equal 12, Numbers.round(12.1234567, 0)
9
+ assert_equal 12.1, Numbers.round(12.1234567, 1)
10
+ assert_equal 12.12, Numbers.round(12.1234567, 2)
11
+ assert_equal 12.123, Numbers.round(12.1234567, 3)
12
+
13
+ assert_equal 12, Numbers.round(12.0000, 2)
14
+ end
15
+ end
@@ -0,0 +1,17 @@
1
+ require_relative '../../test_helper'
2
+ require 'scout_apm/utils/scm'
3
+
4
+ class ScmTest < Minitest::Test
5
+
6
+ def test_relative_scm_path_blank
7
+ assert_equal 'app/models/person.rb', ScoutApm::Utils::Scm.relative_scm_path('app/models/person.rb', '')
8
+ end
9
+
10
+ def test_relative_scm_path_not_blank
11
+ assert_equal 'src/app/models/person.rb', ScoutApm::Utils::Scm.relative_scm_path('app/models/person.rb', 'src')
12
+ end
13
+
14
+ def test_relative_scm_path_not_blank_with_slashes
15
+ assert_equal 'src/app/models/person.rb', ScoutApm::Utils::Scm.relative_scm_path('app/models/person.rb', '/src/')
16
+ end
17
+ end
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.2.0.pre3
4
+ version: 2.3.0.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derek Haynes
@@ -9,24 +9,24 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-08-25 00:00:00.000000000 Z
12
+ date: 2017-09-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: rusage
15
+ name: minitest
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - "~>"
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: 0.2.0
21
- type: :runtime
20
+ version: '0'
21
+ type: :development
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - "~>"
25
+ - - ">="
26
26
  - !ruby/object:Gem::Version
27
- version: 0.2.0
27
+ version: '0'
28
28
  - !ruby/object:Gem::Dependency
29
- name: minitest
29
+ name: mocha
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
32
  - - ">="
@@ -40,7 +40,7 @@ dependencies:
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0'
42
42
  - !ruby/object:Gem::Dependency
43
- name: mocha
43
+ name: pry
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
46
  - - ">="
@@ -54,7 +54,7 @@ dependencies:
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
56
  - !ruby/object:Gem::Dependency
57
- name: pry
57
+ name: m
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
60
  - - ">="
@@ -68,7 +68,7 @@ dependencies:
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0'
70
70
  - !ruby/object:Gem::Dependency
71
- name: m
71
+ name: simplecov
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
74
  - - ">="
@@ -82,7 +82,7 @@ dependencies:
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0'
84
84
  - !ruby/object:Gem::Dependency
85
- name: simplecov
85
+ name: rake-compiler
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
88
  - - ">="
@@ -96,7 +96,35 @@ dependencies:
96
96
  - !ruby/object:Gem::Version
97
97
  version: '0'
98
98
  - !ruby/object:Gem::Dependency
99
- name: rake-compiler
99
+ name: addressable
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ type: :development
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - ">="
110
+ - !ruby/object:Gem::Version
111
+ version: '0'
112
+ - !ruby/object:Gem::Dependency
113
+ name: guard
114
+ requirement: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - ">="
117
+ - !ruby/object:Gem::Version
118
+ version: '0'
119
+ type: :development
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - ">="
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
126
+ - !ruby/object:Gem::Dependency
127
+ name: guard-minitest
100
128
  requirement: !ruby/object:Gem::Requirement
101
129
  requirements:
102
130
  - - ">="
@@ -115,22 +143,23 @@ email:
115
143
  executables: []
116
144
  extensions:
117
145
  - ext/allocations/extconf.rb
118
- - ext/stacks/extconf.rb
146
+ - ext/rusage/extconf.rb
119
147
  extra_rdoc_files: []
120
148
  files:
121
149
  - ".gitignore"
122
150
  - ".rubocop.yml"
123
151
  - CHANGELOG.markdown
124
152
  - Gemfile
153
+ - Guardfile
125
154
  - LICENSE.md
126
155
  - README.markdown
127
156
  - Rakefile
128
157
  - data/cacert.pem
129
158
  - ext/allocations/allocations.c
130
159
  - ext/allocations/extconf.rb
131
- - ext/stacks/extconf.rb
132
- - ext/stacks/scout_atomics.h
133
- - ext/stacks/stacks.c
160
+ - ext/rusage/README.md
161
+ - ext/rusage/extconf.rb
162
+ - ext/rusage/rusage.c
134
163
  - lib/scout_apm.rb
135
164
  - lib/scout_apm/agent.rb
136
165
  - lib/scout_apm/agent/logging.rb
@@ -138,23 +167,24 @@ files:
138
167
  - lib/scout_apm/app_server_load.rb
139
168
  - lib/scout_apm/attribute_arranger.rb
140
169
  - lib/scout_apm/background_job_integrations/delayed_job.rb
170
+ - lib/scout_apm/background_job_integrations/resque.rb
141
171
  - lib/scout_apm/background_job_integrations/sidekiq.rb
172
+ - lib/scout_apm/background_recorder.rb
142
173
  - lib/scout_apm/background_worker.rb
143
174
  - lib/scout_apm/bucket_name_splitter.rb
144
175
  - lib/scout_apm/call_set.rb
145
- - lib/scout_apm/capacity.rb
146
176
  - lib/scout_apm/config.rb
147
177
  - lib/scout_apm/context.rb
148
- - lib/scout_apm/deploy_integrations/capistrano_2.cap
149
- - lib/scout_apm/deploy_integrations/capistrano_2.rb
150
- - lib/scout_apm/deploy_integrations/capistrano_3.cap
151
- - lib/scout_apm/deploy_integrations/capistrano_3.rb
178
+ - lib/scout_apm/db_query_metric_set.rb
179
+ - lib/scout_apm/db_query_metric_stats.rb
180
+ - lib/scout_apm/debug.rb
152
181
  - lib/scout_apm/environment.rb
153
182
  - lib/scout_apm/fake_store.rb
154
183
  - lib/scout_apm/framework_integrations/rails_2.rb
155
184
  - lib/scout_apm/framework_integrations/rails_3_or_4.rb
156
185
  - lib/scout_apm/framework_integrations/ruby.rb
157
186
  - lib/scout_apm/framework_integrations/sinatra.rb
187
+ - lib/scout_apm/git_revision.rb
158
188
  - lib/scout_apm/histogram.rb
159
189
  - lib/scout_apm/ignored_uris.rb
160
190
  - lib/scout_apm/instant/assets/xmlhttp_instrumentation.html
@@ -163,8 +193,8 @@ files:
163
193
  - lib/scout_apm/instruments/.DS_Store
164
194
  - lib/scout_apm/instruments/action_controller_rails_2.rb
165
195
  - lib/scout_apm/instruments/action_controller_rails_3_rails4.rb
196
+ - lib/scout_apm/instruments/action_view.rb
166
197
  - lib/scout_apm/instruments/active_record.rb
167
- - lib/scout_apm/instruments/delayed_job.rb
168
198
  - lib/scout_apm/instruments/elasticsearch.rb
169
199
  - lib/scout_apm/instruments/grape.rb
170
200
  - lib/scout_apm/instruments/http_client.rb
@@ -179,20 +209,26 @@ files:
179
209
  - lib/scout_apm/instruments/process/process_memory.rb
180
210
  - lib/scout_apm/instruments/rails_router.rb
181
211
  - lib/scout_apm/instruments/redis.rb
212
+ - lib/scout_apm/instruments/resque.rb
182
213
  - lib/scout_apm/instruments/sinatra.rb
183
214
  - lib/scout_apm/job_record.rb
184
215
  - lib/scout_apm/layaway.rb
185
216
  - lib/scout_apm/layaway_file.rb
186
217
  - lib/scout_apm/layer.rb
218
+ - lib/scout_apm/layer_children_set.rb
187
219
  - lib/scout_apm/layer_converters/allocation_metric_converter.rb
188
220
  - lib/scout_apm/layer_converters/converter_base.rb
221
+ - lib/scout_apm/layer_converters/database_converter.rb
189
222
  - lib/scout_apm/layer_converters/depth_first_walker.rb
190
223
  - lib/scout_apm/layer_converters/error_converter.rb
224
+ - lib/scout_apm/layer_converters/find_layer_by_type.rb
225
+ - lib/scout_apm/layer_converters/histograms.rb
191
226
  - lib/scout_apm/layer_converters/job_converter.rb
192
227
  - lib/scout_apm/layer_converters/metric_converter.rb
193
228
  - lib/scout_apm/layer_converters/request_queue_time_converter.rb
194
229
  - lib/scout_apm/layer_converters/slow_job_converter.rb
195
230
  - lib/scout_apm/layer_converters/slow_request_converter.rb
231
+ - lib/scout_apm/limited_layer.rb
196
232
  - lib/scout_apm/metric_meta.rb
197
233
  - lib/scout_apm/metric_set.rb
198
234
  - lib/scout_apm/metric_stats.rb
@@ -200,13 +236,19 @@ files:
200
236
  - lib/scout_apm/platform_integrations/cloud_foundry.rb
201
237
  - lib/scout_apm/platform_integrations/heroku.rb
202
238
  - lib/scout_apm/platform_integrations/server.rb
239
+ - lib/scout_apm/rack.rb
240
+ - lib/scout_apm/remote/message.rb
241
+ - lib/scout_apm/remote/recorder.rb
242
+ - lib/scout_apm/remote/router.rb
243
+ - lib/scout_apm/remote/server.rb
203
244
  - lib/scout_apm/reporter.rb
204
245
  - lib/scout_apm/request_histograms.rb
205
246
  - lib/scout_apm/request_manager.rb
206
247
  - lib/scout_apm/scored_item_set.rb
207
248
  - lib/scout_apm/serializers/app_server_load_serializer.rb
208
- - lib/scout_apm/serializers/deploy_serializer.rb
249
+ - lib/scout_apm/serializers/db_query_serializer_to_json.rb
209
250
  - lib/scout_apm/serializers/directive_serializer.rb
251
+ - lib/scout_apm/serializers/histograms_serializer_to_json.rb
210
252
  - lib/scout_apm/serializers/jobs_serializer_to_json.rb
211
253
  - lib/scout_apm/serializers/metrics_to_json_serializer.rb
212
254
  - lib/scout_apm/serializers/payload_serializer.rb
@@ -225,15 +267,17 @@ files:
225
267
  - lib/scout_apm/slow_transaction.rb
226
268
  - lib/scout_apm/stack_item.rb
227
269
  - lib/scout_apm/store.rb
228
- - lib/scout_apm/trace_compactor.rb
270
+ - lib/scout_apm/synchronous_recorder.rb
229
271
  - lib/scout_apm/tracer.rb
230
272
  - lib/scout_apm/tracked_request.rb
231
273
  - lib/scout_apm/utils/active_record_metric_name.rb
232
274
  - lib/scout_apm/utils/backtrace_parser.rb
233
- - lib/scout_apm/utils/fake_stacks.rb
275
+ - lib/scout_apm/utils/gzip_helper.rb
234
276
  - lib/scout_apm/utils/installed_gems.rb
235
277
  - lib/scout_apm/utils/klass_helper.rb
236
278
  - lib/scout_apm/utils/null_logger.rb
279
+ - lib/scout_apm/utils/numbers.rb
280
+ - lib/scout_apm/utils/scm.rb
237
281
  - lib/scout_apm/utils/sql_sanitizer.rb
238
282
  - lib/scout_apm/utils/sql_sanitizer_regex.rb
239
283
  - lib/scout_apm/utils/sql_sanitizer_regex_1_8_7.rb
@@ -247,21 +291,36 @@ files:
247
291
  - test/unit/background_job_integrations/sidekiq_test.rb
248
292
  - test/unit/config_test.rb
249
293
  - test/unit/context_test.rb
294
+ - test/unit/db_query_metric_set_test.rb
295
+ - test/unit/db_query_metric_stats_test.rb
250
296
  - test/unit/environment_test.rb
297
+ - test/unit/git_revision_test.rb
251
298
  - test/unit/histogram_test.rb
252
299
  - test/unit/ignored_uris_test.rb
253
300
  - test/unit/instruments/active_record_instruments_test.rb
301
+ - test/unit/instruments/net_http_test.rb
302
+ - test/unit/instruments/percentile_sampler_test.rb
254
303
  - test/unit/layaway_test.rb
304
+ - test/unit/layer_children_set_test.rb
305
+ - test/unit/layer_converters/depth_first_walker_test.rb
306
+ - test/unit/layer_converters/metric_converter_test.rb
307
+ - test/unit/layer_converters/stubs.rb
308
+ - test/unit/limited_layer_test.rb
255
309
  - test/unit/metric_set_test.rb
310
+ - test/unit/remote/test_message.rb
311
+ - test/unit/remote/test_router.rb
312
+ - test/unit/remote/test_server.rb
256
313
  - test/unit/scored_item_set_test.rb
257
314
  - test/unit/serializers/payload_serializer_test.rb
258
315
  - test/unit/slow_job_policy_test.rb
259
316
  - test/unit/slow_request_policy_test.rb
260
317
  - test/unit/sql_sanitizer_test.rb
261
318
  - test/unit/store_test.rb
319
+ - test/unit/test_tracked_request.rb
262
320
  - test/unit/utils/active_record_metric_name_test.rb
263
321
  - test/unit/utils/backtrace_parser_test.rb
264
- - tester.rb
322
+ - test/unit/utils/numbers_test.rb
323
+ - test/unit/utils/scm.rb
265
324
  homepage: https://github.com/scoutapp/scout_apm_ruby
266
325
  licenses:
267
326
  - Proprietary (See LICENSE.md)
@@ -283,8 +342,44 @@ required_rubygems_version: !ruby/object:Gem::Requirement
283
342
  version: 1.3.1
284
343
  requirements: []
285
344
  rubyforge_project: scout_apm
286
- rubygems_version: 2.2.2
345
+ rubygems_version: 2.4.5.2
287
346
  signing_key:
288
347
  specification_version: 4
289
348
  summary: Ruby application performance monitoring
290
- test_files: []
349
+ test_files:
350
+ - test/data/config_test_1.yml
351
+ - test/test_helper.rb
352
+ - test/unit/agent_test.rb
353
+ - test/unit/background_job_integrations/sidekiq_test.rb
354
+ - test/unit/config_test.rb
355
+ - test/unit/context_test.rb
356
+ - test/unit/db_query_metric_set_test.rb
357
+ - test/unit/db_query_metric_stats_test.rb
358
+ - test/unit/environment_test.rb
359
+ - test/unit/git_revision_test.rb
360
+ - test/unit/histogram_test.rb
361
+ - test/unit/ignored_uris_test.rb
362
+ - test/unit/instruments/active_record_instruments_test.rb
363
+ - test/unit/instruments/net_http_test.rb
364
+ - test/unit/instruments/percentile_sampler_test.rb
365
+ - test/unit/layaway_test.rb
366
+ - test/unit/layer_children_set_test.rb
367
+ - test/unit/layer_converters/depth_first_walker_test.rb
368
+ - test/unit/layer_converters/metric_converter_test.rb
369
+ - test/unit/layer_converters/stubs.rb
370
+ - test/unit/limited_layer_test.rb
371
+ - test/unit/metric_set_test.rb
372
+ - test/unit/remote/test_message.rb
373
+ - test/unit/remote/test_router.rb
374
+ - test/unit/remote/test_server.rb
375
+ - test/unit/scored_item_set_test.rb
376
+ - test/unit/serializers/payload_serializer_test.rb
377
+ - test/unit/slow_job_policy_test.rb
378
+ - test/unit/slow_request_policy_test.rb
379
+ - test/unit/sql_sanitizer_test.rb
380
+ - test/unit/store_test.rb
381
+ - test/unit/test_tracked_request.rb
382
+ - test/unit/utils/active_record_metric_name_test.rb
383
+ - test/unit/utils/backtrace_parser_test.rb
384
+ - test/unit/utils/numbers_test.rb
385
+ - test/unit/utils/scm.rb