scout_apm 2.6.10 → 3.0.0.pre0
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 +5 -5
- data/.gitignore +1 -2
- data/.rubocop.yml +3 -11
- data/CHANGELOG.markdown +4 -362
- data/Gemfile +1 -14
- data/README.markdown +7 -52
- data/Rakefile +1 -0
- data/ext/allocations/allocations.c +1 -7
- data/ext/allocations/extconf.rb +0 -1
- data/ext/rusage/rusage.c +0 -26
- data/ext/stacks/extconf.rb +37 -0
- data/ext/stacks/scout_atomics.h +86 -0
- data/ext/stacks/stacks.c +811 -0
- data/lib/scout_apm/agent/logging.rb +69 -0
- data/lib/scout_apm/agent/reporting.rb +126 -0
- data/lib/scout_apm/agent.rb +259 -138
- data/lib/scout_apm/app_server_load.rb +15 -41
- data/lib/scout_apm/attribute_arranger.rb +3 -14
- data/lib/scout_apm/background_job_integrations/delayed_job.rb +1 -70
- data/lib/scout_apm/background_job_integrations/sidekiq.rb +24 -31
- data/lib/scout_apm/background_worker.rb +12 -23
- data/lib/scout_apm/capacity.rb +57 -0
- data/lib/scout_apm/config.rb +37 -206
- data/lib/scout_apm/context.rb +4 -20
- data/lib/scout_apm/deploy_integrations/capistrano_2.cap +12 -0
- data/lib/scout_apm/deploy_integrations/capistrano_2.rb +83 -0
- data/lib/scout_apm/deploy_integrations/capistrano_3.cap +12 -0
- data/lib/scout_apm/deploy_integrations/capistrano_3.rb +88 -0
- data/lib/scout_apm/environment.rb +28 -42
- data/lib/scout_apm/fake_store.rb +0 -12
- data/lib/scout_apm/framework_integrations/rails_2.rb +1 -2
- data/lib/scout_apm/framework_integrations/rails_3_or_4.rb +6 -17
- data/lib/scout_apm/framework_integrations/sinatra.rb +1 -1
- data/lib/scout_apm/histogram.rb +3 -12
- data/lib/scout_apm/instant/assets/xmlhttp_instrumentation.html +2 -2
- data/lib/scout_apm/instant/middleware.rb +54 -202
- data/lib/scout_apm/instant_reporting.rb +7 -7
- data/lib/scout_apm/instruments/.DS_Store +0 -0
- data/lib/scout_apm/instruments/action_controller_rails_2.rb +9 -15
- data/lib/scout_apm/instruments/action_controller_rails_3_rails4.rb +76 -124
- data/lib/scout_apm/instruments/active_record.rb +29 -324
- data/lib/scout_apm/instruments/delayed_job.rb +57 -0
- data/lib/scout_apm/instruments/elasticsearch.rb +6 -10
- data/lib/scout_apm/instruments/grape.rb +9 -12
- data/lib/scout_apm/instruments/http_client.rb +7 -14
- data/lib/scout_apm/instruments/influxdb.rb +6 -10
- data/lib/scout_apm/instruments/middleware_detailed.rb +11 -15
- data/lib/scout_apm/instruments/middleware_summary.rb +5 -11
- data/lib/scout_apm/instruments/mongoid.rb +8 -39
- data/lib/scout_apm/instruments/moped.rb +6 -11
- data/lib/scout_apm/instruments/net_http.rb +9 -27
- data/lib/scout_apm/instruments/percentile_sampler.rb +23 -42
- data/lib/scout_apm/instruments/process/process_cpu.rb +6 -11
- data/lib/scout_apm/instruments/process/process_memory.rb +12 -17
- data/lib/scout_apm/instruments/rails_router.rb +6 -12
- data/lib/scout_apm/instruments/redis.rb +6 -10
- data/lib/scout_apm/instruments/sinatra.rb +4 -5
- data/lib/scout_apm/job_record.rb +2 -4
- data/lib/scout_apm/layaway.rb +34 -88
- data/lib/scout_apm/layaway_file.rb +3 -13
- data/lib/scout_apm/layer.rb +60 -25
- data/lib/scout_apm/layer_converters/allocation_metric_converter.rb +6 -7
- data/lib/scout_apm/layer_converters/converter_base.rb +14 -203
- data/lib/scout_apm/layer_converters/depth_first_walker.rb +10 -22
- data/lib/scout_apm/layer_converters/error_converter.rb +8 -8
- data/lib/scout_apm/layer_converters/job_converter.rb +50 -37
- data/lib/scout_apm/layer_converters/metric_converter.rb +19 -18
- data/lib/scout_apm/layer_converters/request_queue_time_converter.rb +13 -13
- data/lib/scout_apm/layer_converters/slow_job_converter.rb +116 -52
- data/lib/scout_apm/layer_converters/slow_request_converter.rb +120 -51
- data/lib/scout_apm/metric_meta.rb +5 -0
- data/lib/scout_apm/metric_set.rb +1 -9
- data/lib/scout_apm/metric_stats.rb +8 -7
- data/lib/scout_apm/middleware.rb +9 -7
- data/lib/scout_apm/reporter.rb +24 -71
- data/lib/scout_apm/request_histograms.rb +0 -12
- data/lib/scout_apm/request_manager.rb +7 -5
- data/lib/scout_apm/scored_item_set.rb +0 -7
- data/lib/scout_apm/serializers/app_server_load_serializer.rb +0 -4
- data/lib/scout_apm/serializers/deploy_serializer.rb +16 -0
- data/lib/scout_apm/serializers/directive_serializer.rb +0 -4
- data/lib/scout_apm/serializers/payload_serializer.rb +4 -11
- data/lib/scout_apm/serializers/payload_serializer_to_json.rb +16 -35
- data/lib/scout_apm/serializers/slow_jobs_serializer_to_json.rb +1 -2
- data/lib/scout_apm/server_integrations/passenger.rb +1 -1
- data/lib/scout_apm/server_integrations/puma.rb +2 -5
- data/lib/scout_apm/slow_job_policy.rb +13 -25
- data/lib/scout_apm/slow_job_record.rb +4 -13
- data/lib/scout_apm/slow_request_policy.rb +13 -25
- data/lib/scout_apm/slow_transaction.rb +5 -25
- data/lib/scout_apm/store.rb +32 -99
- data/lib/scout_apm/trace_compactor.rb +312 -0
- data/lib/scout_apm/tracer.rb +31 -35
- data/lib/scout_apm/tracked_request.rb +95 -262
- data/lib/scout_apm/utils/active_record_metric_name.rb +13 -88
- data/lib/scout_apm/utils/backtrace_parser.rb +4 -7
- data/lib/scout_apm/utils/fake_stacks.rb +87 -0
- data/lib/scout_apm/utils/installed_gems.rb +3 -7
- data/lib/scout_apm/utils/klass_helper.rb +2 -8
- data/lib/scout_apm/utils/null_logger.rb +13 -0
- data/lib/scout_apm/utils/sql_sanitizer.rb +5 -16
- data/lib/scout_apm/utils/sql_sanitizer_regex.rb +0 -7
- data/lib/scout_apm/utils/sql_sanitizer_regex_1_8_7.rb +0 -6
- data/lib/scout_apm/utils/unique_id.rb +0 -27
- data/lib/scout_apm/version.rb +2 -1
- data/lib/scout_apm.rb +25 -84
- data/scout_apm.gemspec +3 -17
- data/test/test_helper.rb +3 -57
- data/test/unit/agent_test.rb +54 -1
- data/test/unit/background_job_integrations/sidekiq_test.rb +3 -0
- data/test/unit/config_test.rb +12 -25
- data/test/unit/context_test.rb +4 -4
- data/test/unit/histogram_test.rb +4 -25
- data/test/unit/ignored_uris_test.rb +1 -1
- data/test/unit/instruments/active_record_instruments_test.rb +5 -0
- data/test/unit/layaway_test.rb +2 -62
- data/test/unit/serializers/payload_serializer_test.rb +15 -43
- data/test/unit/slow_request_policy_test.rb +6 -15
- data/test/unit/sql_sanitizer_test.rb +6 -53
- data/test/unit/store_test.rb +4 -73
- data/test/unit/utils/active_record_metric_name_test.rb +5 -59
- data/test/unit/utils/backtrace_parser_test.rb +1 -6
- data/tester.rb +53 -0
- metadata +28 -229
- data/.travis.yml +0 -26
- data/Guardfile +0 -43
- data/gems/README.md +0 -28
- data/gems/octoshark.gemfile +0 -4
- data/gems/rails3.gemfile +0 -5
- data/gems/rails4.gemfile +0 -4
- data/gems/rails5.gemfile +0 -4
- data/gems/rails6.gemfile +0 -4
- data/lib/scout_apm/agent/exit_handler.rb +0 -65
- data/lib/scout_apm/agent/preconditions.rb +0 -81
- data/lib/scout_apm/agent_context.rb +0 -261
- data/lib/scout_apm/auto_instrument/instruction_sequence.rb +0 -31
- data/lib/scout_apm/auto_instrument/layer.rb +0 -23
- data/lib/scout_apm/auto_instrument/parser.rb +0 -27
- data/lib/scout_apm/auto_instrument/rails.rb +0 -175
- data/lib/scout_apm/auto_instrument.rb +0 -5
- data/lib/scout_apm/background_job_integrations/legacy_sneakers.rb +0 -55
- data/lib/scout_apm/background_job_integrations/que.rb +0 -134
- data/lib/scout_apm/background_job_integrations/resque.rb +0 -88
- data/lib/scout_apm/background_job_integrations/shoryuken.rb +0 -124
- data/lib/scout_apm/background_job_integrations/sneakers.rb +0 -87
- data/lib/scout_apm/background_recorder.rb +0 -48
- data/lib/scout_apm/db_query_metric_set.rb +0 -97
- data/lib/scout_apm/db_query_metric_stats.rb +0 -102
- data/lib/scout_apm/debug.rb +0 -37
- data/lib/scout_apm/detailed_trace.rb +0 -217
- data/lib/scout_apm/error.rb +0 -27
- data/lib/scout_apm/error_service/error_buffer.rb +0 -39
- data/lib/scout_apm/error_service/error_record.rb +0 -211
- data/lib/scout_apm/error_service/ignored_exceptions.rb +0 -66
- data/lib/scout_apm/error_service/middleware.rb +0 -32
- data/lib/scout_apm/error_service/notifier.rb +0 -33
- data/lib/scout_apm/error_service/payload.rb +0 -47
- data/lib/scout_apm/error_service/periodic_work.rb +0 -17
- data/lib/scout_apm/error_service/railtie.rb +0 -11
- data/lib/scout_apm/error_service/sidekiq.rb +0 -80
- data/lib/scout_apm/error_service.rb +0 -32
- data/lib/scout_apm/extensions/config.rb +0 -87
- data/lib/scout_apm/extensions/transaction_callback_payload.rb +0 -74
- data/lib/scout_apm/git_revision.rb +0 -59
- data/lib/scout_apm/instrument_manager.rb +0 -88
- data/lib/scout_apm/instruments/action_view.rb +0 -141
- data/lib/scout_apm/instruments/http.rb +0 -48
- data/lib/scout_apm/instruments/memcached.rb +0 -43
- data/lib/scout_apm/instruments/resque.rb +0 -39
- data/lib/scout_apm/instruments/samplers.rb +0 -11
- data/lib/scout_apm/layer_children_set.rb +0 -86
- data/lib/scout_apm/layer_converters/database_converter.rb +0 -70
- data/lib/scout_apm/layer_converters/find_layer_by_type.rb +0 -38
- data/lib/scout_apm/layer_converters/histograms.rb +0 -15
- data/lib/scout_apm/layer_converters/trace_converter.rb +0 -184
- data/lib/scout_apm/limited_layer.rb +0 -126
- data/lib/scout_apm/logger.rb +0 -158
- data/lib/scout_apm/periodic_work.rb +0 -47
- data/lib/scout_apm/rack.rb +0 -26
- data/lib/scout_apm/remote/message.rb +0 -27
- data/lib/scout_apm/remote/recorder.rb +0 -57
- data/lib/scout_apm/remote/router.rb +0 -49
- data/lib/scout_apm/remote/server.rb +0 -60
- data/lib/scout_apm/reporting.rb +0 -143
- data/lib/scout_apm/serializers/db_query_serializer_to_json.rb +0 -15
- data/lib/scout_apm/serializers/histograms_serializer_to_json.rb +0 -21
- data/lib/scout_apm/synchronous_recorder.rb +0 -30
- data/lib/scout_apm/tasks/doctor.rb +0 -75
- data/lib/scout_apm/tasks/support.rb +0 -22
- data/lib/scout_apm/transaction.rb +0 -13
- data/lib/scout_apm/transaction_time_consumed.rb +0 -51
- data/lib/scout_apm/utils/gzip_helper.rb +0 -24
- data/lib/scout_apm/utils/marshal_logging.rb +0 -90
- data/lib/scout_apm/utils/numbers.rb +0 -14
- data/lib/scout_apm/utils/scm.rb +0 -14
- data/lib/tasks/doctor.rake +0 -11
- data/test/tmp/README.md +0 -17
- data/test/unit/agent_context_test.rb +0 -15
- data/test/unit/auto_instrument/assignments-instrumented.rb +0 -31
- data/test/unit/auto_instrument/assignments.rb +0 -31
- data/test/unit/auto_instrument/controller-ast.txt +0 -57
- data/test/unit/auto_instrument/controller-instrumented.rb +0 -49
- data/test/unit/auto_instrument/controller.rb +0 -49
- data/test/unit/auto_instrument/rescue_from-instrumented.rb +0 -13
- data/test/unit/auto_instrument/rescue_from.rb +0 -13
- data/test/unit/auto_instrument_test.rb +0 -54
- data/test/unit/db_query_metric_set_test.rb +0 -67
- data/test/unit/db_query_metric_stats_test.rb +0 -113
- data/test/unit/error_service/error_buffer_test.rb +0 -25
- data/test/unit/error_service/ignored_exceptions_test.rb +0 -49
- data/test/unit/extensions/periodic_callbacks_test.rb +0 -58
- data/test/unit/extensions/transaction_callbacks_test.rb +0 -58
- data/test/unit/fake_store_test.rb +0 -10
- data/test/unit/git_revision_test.rb +0 -15
- data/test/unit/instruments/active_record_test.rb +0 -40
- data/test/unit/instruments/net_http_test.rb +0 -27
- data/test/unit/instruments/percentile_sampler_test.rb +0 -133
- data/test/unit/layer_children_set_test.rb +0 -97
- data/test/unit/layer_converters/depth_first_walker_test.rb +0 -70
- data/test/unit/layer_converters/metric_converter_test.rb +0 -22
- data/test/unit/layer_converters/stubs.rb +0 -33
- data/test/unit/limited_layer_test.rb +0 -53
- data/test/unit/logger_test.rb +0 -69
- data/test/unit/remote/test_message.rb +0 -13
- data/test/unit/remote/test_router.rb +0 -33
- data/test/unit/remote/test_server.rb +0 -15
- data/test/unit/request_histograms_test.rb +0 -17
- data/test/unit/tracer_test.rb +0 -76
- data/test/unit/tracked_request_test.rb +0 -71
- data/test/unit/transaction_test.rb +0 -14
- data/test/unit/transaction_time_consumed_test.rb +0 -46
- data/test/unit/utils/numbers_test.rb +0 -15
- data/test/unit/utils/scm.rb +0 -17
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: afa1d7b25baf3d94a547899966b95419ac560d07
|
|
4
|
+
data.tar.gz: d6201d2acc85f2e94c92315b8193d110a4febd0a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9a125da761d39c62094fc48ca66163bac787c0de62e9b6a3f38e984ae2ab8f41dcc7d271519764694c6b9a194e084c626bbf7b042a364ee56afe524c912fd83a
|
|
7
|
+
data.tar.gz: cce9304bd70490eb711c92a6df03d656710c01eb0343f809e58d0bb49c02ec152a99f668b21f7e51424aec34e432286c0ec83f7cdc74cdc994300ae6aa0b4ed6
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
# Disable all cops by default
|
|
2
|
-
AllCops:
|
|
3
|
-
DisabledByDefault: true
|
|
4
|
-
Exclude:
|
|
5
|
-
- 'test/unit/auto_instrument/*'
|
|
6
|
-
- vendor/bundle/**/*
|
|
7
|
-
|
|
8
1
|
# 80 is stifling, especially with a few levels of nesting before we even start.
|
|
9
2
|
# So bump it to 100 to keep really long lines from creeping in.
|
|
10
3
|
Metrics/LineLength:
|
|
11
|
-
Enabled: false
|
|
12
4
|
Max: 100
|
|
13
5
|
|
|
14
|
-
Style/
|
|
15
|
-
|
|
16
|
-
|
|
6
|
+
Style/UseHashRocketsWithSymbolValues: false
|
|
7
|
+
|
|
8
|
+
|
data/CHANGELOG.markdown
CHANGED
|
@@ -1,369 +1,11 @@
|
|
|
1
|
-
# 2.
|
|
1
|
+
# 2.2.0
|
|
2
2
|
|
|
3
|
-
*
|
|
4
|
-
|
|
5
|
-
# 2.6.9
|
|
6
|
-
|
|
7
|
-
* Add `ssl_cert_file` config option (#352)
|
|
8
|
-
* Improve sanitization of Postgres UPDATE SQL (#351)
|
|
9
|
-
* Allow custom URL sanitization (#341)
|
|
10
|
-
|
|
11
|
-
# 2.6.8
|
|
12
|
-
|
|
13
|
-
* Lock rake version for 1.8.7 to older version (#329)
|
|
14
|
-
* Delete unneeded .DS_Store file that snuck in (#334)
|
|
15
|
-
* Fix typo in "queue_time_ms"
|
|
16
|
-
* Fix Rails 6 deprecation warning at boot time (#337)
|
|
17
|
-
* Fix partial naming on Rails 6.0 (#339)
|
|
18
|
-
* Support Sidekiq 6.1 instrumentation (#340)
|
|
19
|
-
|
|
20
|
-
# 2.6.7
|
|
21
|
-
|
|
22
|
-
* Remove accidental call to `as_json`
|
|
23
|
-
|
|
24
|
-
# 2.6.6
|
|
25
|
-
|
|
26
|
-
* Add basic support for parsing Microsoft SQLServer queries (#317)
|
|
27
|
-
* Refine Postgresql Sanitization with subqueries and JSON operations (#262)
|
|
28
|
-
|
|
29
|
-
# 2.6.5
|
|
30
|
-
|
|
31
|
-
* Add a tag to any requests that reach maximum number of spans (#316)
|
|
32
|
-
* Update testing library Mocha (#315)
|
|
33
|
-
* Fix case sensitivity mismatch in Job renaming (#314)
|
|
34
|
-
* Add support for Sneakers 2.5 (#313)
|
|
35
|
-
* Fix edge case with Resque instrumentation (#312)
|
|
36
|
-
* Fix missing source code when used with BugSnag (#308)
|
|
37
|
-
|
|
38
|
-
# 2.6.4
|
|
39
|
-
|
|
40
|
-
* Add defensive check against a nil @address in Net/HTTP instruments (#306)
|
|
41
|
-
|
|
42
|
-
# 2.6.3
|
|
43
|
-
|
|
44
|
-
* Standardize Metadata with other language agents (#302)
|
|
45
|
-
* Add Mongoid 7.x support (#295)
|
|
46
|
-
* Add HTTP::Client support (#260)
|
|
47
|
-
|
|
48
|
-
# 2.6.2
|
|
49
|
-
|
|
50
|
-
* Fix Autoinstruments logging when running without ActiveSupport (#290)
|
|
51
|
-
* Fix edge-case Autoinstruments syntax error (#287)
|
|
52
|
-
* Fix invalid syntax for running on Ruby 1.8.7
|
|
53
|
-
|
|
54
|
-
# 2.6.1
|
|
55
|
-
|
|
56
|
-
* Logging total autoinstrumented spans and the ratio of significant to total spans (#283).
|
|
57
|
-
* Added `autoinstruments_ignore` option (also #283).
|
|
58
|
-
|
|
59
|
-
# 2.6.0
|
|
60
|
-
|
|
61
|
-
* Autoinstruments (#247). Disabled by default. Set `auto_instruments: true` to enable.
|
|
62
|
-
|
|
63
|
-
# 2.5.3
|
|
64
|
-
|
|
65
|
-
* Add Que support (#265)
|
|
66
|
-
* Add Memcached support (#279)
|
|
67
|
-
|
|
68
|
-
# 2.5.2
|
|
69
|
-
|
|
70
|
-
* Don't process limited layers in detailed traces (#268)
|
|
71
|
-
* Fix OctoShark (and other gems which patch ActiveRecord) interaction (#217)
|
|
72
|
-
* Legacy [Rails 2.3 fix for as_json](https://github.com/scoutapp/scout_apm_ruby/pull/276)
|
|
73
|
-
|
|
74
|
-
# 2.5.1
|
|
75
|
-
|
|
76
|
-
* Decrease timeline trace span limit to 1,500 to address [this bug](https://github.com/scoutapp/scout_apm_ruby/issues/267).
|
|
77
|
-
|
|
78
|
-
# 2.5.0
|
|
79
|
-
|
|
80
|
-
* Added timeline traces and an associated `timeline_traces: true` config option.
|
|
81
|
-
* Increased timeline traces span limit to 2,500 from 500.
|
|
82
|
-
|
|
83
|
-
# 2.4.24
|
|
84
|
-
|
|
85
|
-
* Fix for prepending view instruments in the case of templates that lack a `virtual_path` (#257).
|
|
86
|
-
|
|
87
|
-
# 2.4.23
|
|
88
|
-
|
|
89
|
-
* Extend #251 to use prepend on all view instruments (#255)
|
|
90
|
-
|
|
91
|
-
# 2.4.22
|
|
92
|
-
|
|
93
|
-
* Support Rails 6.0 View Instruments (#251)
|
|
94
|
-
* Update documentation URLs (#236)
|
|
95
|
-
|
|
96
|
-
# 2.4.21
|
|
97
|
-
|
|
98
|
-
* App & Background Integrations only install when needed (#228)
|
|
99
|
-
* New Setting `collect_remote_ip`, to optionally disable automated capture of
|
|
100
|
-
end-user IP Address. No change to default behavior.
|
|
101
|
-
* Allow setting `compress_payload` option from ENV var (#234)
|
|
102
|
-
|
|
103
|
-
# 2.4.20
|
|
104
|
-
|
|
105
|
-
* `start_resque_server_instrument` option to allow disabling the WEBrick server
|
|
106
|
-
component in custom installation scenarios
|
|
107
|
-
* Allow setting `revision_sha` setting in YAML
|
|
108
|
-
|
|
109
|
-
# 2.4.19
|
|
110
|
-
|
|
111
|
-
* Fix disabled_instruments (#220)
|
|
112
|
-
|
|
113
|
-
# 2.4.18
|
|
114
|
-
|
|
115
|
-
* Add Shoryuken Support (#215)
|
|
116
|
-
* Add Sneakers Support (#216)
|
|
117
|
-
|
|
118
|
-
# 2.4.17
|
|
119
|
-
|
|
120
|
-
* Renames SQL `BEGIN` and `COMMIT` statements from `SQL#other` to `SQL#begin` and `SQL#commit`, respectively.
|
|
121
|
-
* Makes naming between transaction and database metrics consistent. Previously, database metrics lacking a provided ActiveRecord label were named `SQL#other`.
|
|
122
|
-
|
|
123
|
-
# 2.4.16
|
|
124
|
-
|
|
125
|
-
* Fix synchronization bug in Store (#205, PR #210)
|
|
126
|
-
|
|
127
|
-
# 2.4.15
|
|
128
|
-
|
|
129
|
-
* Fix bug that causes no data to be reported to Scout when DataDog is installed (#211)
|
|
130
|
-
* Fix `NoMethodError for LayerChildrenSet` when `log_level: debug` in certain situations.
|
|
131
|
-
|
|
132
|
-
# 2.4.14
|
|
133
|
-
|
|
134
|
-
* Fix database connection issue when installed in an app also using the Textacular gem
|
|
135
|
-
|
|
136
|
-
# 2.4.13
|
|
137
|
-
|
|
138
|
-
* Incorporating total time consumed into transaction trace policy
|
|
139
|
-
|
|
140
|
-
# 2.4.12
|
|
141
|
-
|
|
142
|
-
* Calculates DelayedJob queue latency correctly when jobs are scheduled to run in the future
|
|
143
|
-
|
|
144
|
-
# 2.4.11
|
|
145
|
-
|
|
146
|
-
* Adds transaction + periodic reporting callback extension support
|
|
147
|
-
* Use Module#prepend if available for ActiveRecord `exec_query` instrument
|
|
148
|
-
|
|
149
|
-
# 2.4.10
|
|
150
|
-
|
|
151
|
-
* Improve ActiveRecord instrumentation across Rails 3.2+, and adding support
|
|
152
|
-
for the newly released Rails 5.2
|
|
153
|
-
|
|
154
|
-
# 2.4.9
|
|
155
|
-
|
|
156
|
-
* ScoutApm::Transaction#rename and #ignore API
|
|
157
|
-
* Explicit custom instrumentation with ScoutApm::Tracer#instrument blocks,
|
|
158
|
-
without needing to include a module
|
|
159
|
-
* Quieter logging in normal startup cases
|
|
160
|
-
* Upgraded testing infrastructure
|
|
161
|
-
|
|
162
|
-
# 2.4.8
|
|
163
|
-
|
|
164
|
-
* Fix issue with detailed middleware instrumentation
|
|
165
|
-
|
|
166
|
-
# 2.4.7
|
|
167
|
-
|
|
168
|
-
* Fix issue recording backtraces
|
|
169
|
-
|
|
170
|
-
# 2.4.6
|
|
171
|
-
|
|
172
|
-
* Fix an edge case for Resque instrumentation
|
|
173
|
-
|
|
174
|
-
# 2.4.5
|
|
175
|
-
|
|
176
|
-
* More robust installation of instruments at startup
|
|
177
|
-
* Several (very) minor bug fixes
|
|
178
|
-
|
|
179
|
-
# 2.4.4
|
|
180
|
-
|
|
181
|
-
* Prevent agent from starting when monitor=false
|
|
182
|
-
* Fix double-counting of HTTP requests when multiple http libraries are present
|
|
183
|
-
* Fix an issue with Resque instrumentation
|
|
184
|
-
|
|
185
|
-
# 2.4.3
|
|
186
|
-
|
|
187
|
-
* Ensure a startup hook runs on forking webservers
|
|
188
|
-
|
|
189
|
-
# 2.4.2
|
|
190
|
-
|
|
191
|
-
* Fix shutdown hook for Passenger
|
|
192
|
-
|
|
193
|
-
# 2.4.1
|
|
194
|
-
|
|
195
|
-
* Fix logging on STDOUT only platforms (Heroku)
|
|
196
|
-
|
|
197
|
-
# 2.4.0
|
|
198
|
-
|
|
199
|
-
* Rework agent startup sequence
|
|
200
|
-
* Install all background job instrumentations if you're running more than one
|
|
201
|
-
* Capture longer individual SQL statements
|
|
202
|
-
* Capture multiple SQL statements if multiple are run during a single AR call.
|
|
203
|
-
|
|
204
|
-
# 2.3.5
|
|
205
|
-
|
|
206
|
-
* More robust recovery from stale layaway files
|
|
207
|
-
* Quiet logging when hitting unusual layaway file limits
|
|
208
|
-
* Better naming for Sidekiq delayed method jobs
|
|
209
|
-
* Webrick is only required if actually needed
|
|
210
|
-
|
|
211
|
-
# 2.3.4
|
|
212
|
-
|
|
213
|
-
* Capture 300 characters of a url from net/http and httpclient instruments (up from 100).
|
|
214
|
-
|
|
215
|
-
# 2.3.3
|
|
216
|
-
|
|
217
|
-
* Capture ActiveRecord calls that generate more complex queries
|
|
218
|
-
* More aggressively determine names of complex queries (to determine "User/find", "Account/create" and similar)
|
|
219
|
-
* Increases the maximum size of SQL queries that are sanitized to 16KB from 4 KB
|
|
220
|
-
* Captures all SQL individual queries generated in a given AR call (previous only a single query was captured)
|
|
221
|
-
|
|
222
|
-
# 2.3.2
|
|
223
|
-
|
|
224
|
-
* More robust startup sequence when using `rails server` vs. directly launching an app server
|
|
225
|
-
* Avoid incompatibility with 3rd party gems that aggressively obtain database connections
|
|
226
|
-
|
|
227
|
-
# 2.3.1
|
|
228
|
-
|
|
229
|
-
* Fix DevTrace bug
|
|
230
|
-
|
|
231
|
-
# 2.3.0
|
|
232
|
-
|
|
233
|
-
Note: ScoutApm Agent version 2.2.0 was the initial ScoutProf agent that was
|
|
234
|
-
determined quickly to be a big enough change to warrant the move to 3.0. We are not
|
|
235
|
-
reusing that version number to avoid confusion.
|
|
236
|
-
|
|
237
|
-
* Deeper database query instrumentation. The agent now collects app-wide
|
|
238
|
-
database usage on every call. This will allow you to better identify
|
|
239
|
-
persistently slow queries, and capacity bottlenecks.
|
|
240
|
-
* Optimize the approach used during recording each request to avoid unnecessary
|
|
241
|
-
work, improving performance
|
|
242
|
-
|
|
243
|
-
# 2.1.32
|
|
244
|
-
|
|
245
|
-
* Better naming when using Resque + ActiveJob
|
|
246
|
-
* Better naming when using Sidekiq + DelayedExtension
|
|
247
|
-
|
|
248
|
-
# 2.1.31
|
|
249
|
-
|
|
250
|
-
* Better detection of Resque queue names
|
|
251
|
-
* Fix passing arguments through Active Record instrumentation. (Thanks to Nick Quaranto for providing the fix)
|
|
252
|
-
* Stricter checks to prevent agent from starting in Rails console
|
|
253
|
-
|
|
254
|
-
# 2.1.30
|
|
255
|
-
|
|
256
|
-
* Add Resque support.
|
|
257
|
-
|
|
258
|
-
# 2.1.29
|
|
259
|
-
|
|
260
|
-
* Add `scm_subdirectory` option. Useful for when your app code does not live in your SCM root directory.
|
|
261
|
-
|
|
262
|
-
# 2.1.28
|
|
263
|
-
|
|
264
|
-
* Changes to app server load data
|
|
265
|
-
|
|
266
|
-
# 2.1.27
|
|
267
|
-
|
|
268
|
-
* Don't attempt to call `current_layer.type` on nil
|
|
269
|
-
|
|
270
|
-
# 2.1.26
|
|
271
|
-
|
|
272
|
-
* Bug fix [4b188d6](https://github.com/scoutapp/scout_apm_ruby/commit/4b188d698852c86b86d8768ea5b37d706ce544fe)
|
|
273
|
-
|
|
274
|
-
# 2.1.25
|
|
275
|
-
|
|
276
|
-
* Automatically instrument API and Metal controllers.
|
|
277
|
-
|
|
278
|
-
# 2.1.24
|
|
279
|
-
|
|
280
|
-
* Capture additional layers of application backtrace frames. (From 3 -> 8)
|
|
281
|
-
|
|
282
|
-
# 2.1.23
|
|
283
|
-
|
|
284
|
-
* Extend Mongoid instrumentation to 6.x
|
|
285
|
-
|
|
286
|
-
# 2.1.22
|
|
287
|
-
|
|
288
|
-
* Add DevTrace support for newest 4.2.x and 5.x versions of Rails
|
|
289
|
-
|
|
290
|
-
# 2.1.21
|
|
291
|
-
|
|
292
|
-
* Fix edge case, causing DevTrace to fail
|
|
293
|
-
* Add debug tooling, allowing custom functions to be inserted into the agent at
|
|
294
|
-
key points.
|
|
295
|
-
|
|
296
|
-
# 2.1.20
|
|
297
|
-
|
|
298
|
-
* Add a `detailed_middleware` boolean configuration option to capture
|
|
299
|
-
per-middleware data, as opposed to the default of aggregating all middleware
|
|
300
|
-
together. This has a small amount of additional overhead, approximately
|
|
301
|
-
10-15ms per request.
|
|
302
|
-
|
|
303
|
-
# 2.1.19
|
|
304
|
-
|
|
305
|
-
* Log all configuration settings at start when log level is debug
|
|
306
|
-
* Tune DelayedJob class name detection
|
|
307
|
-
|
|
308
|
-
# 2.1.18
|
|
309
|
-
|
|
310
|
-
* Max layaway file threshold limit
|
|
311
|
-
|
|
312
|
-
# 2.1.17
|
|
313
|
-
|
|
314
|
-
* Additional logging around file system usage
|
|
315
|
-
|
|
316
|
-
# 2.1.16
|
|
317
|
-
|
|
318
|
-
* Extract the name correctly for DelayedJob workers run via ActiveJob
|
|
319
|
-
|
|
320
|
-
# 2.1.15
|
|
321
|
-
|
|
322
|
-
* Limit memory usage for very long running requests.
|
|
323
|
-
|
|
324
|
-
# 2.1.14
|
|
325
|
-
|
|
326
|
-
* Add TrackedRequest#ignore_request! to entirely ignore and stop capturing a
|
|
327
|
-
certain request. Use in your code by calling:
|
|
328
|
-
ScoutApm::RequestManager.lookup.ignore_request!
|
|
329
|
-
|
|
330
|
-
# 2.1.13
|
|
331
|
-
|
|
332
|
-
* Rework Delayed Job instrumentation to not interfere with other instruments.
|
|
333
|
-
|
|
334
|
-
# 2.1.12
|
|
335
|
-
|
|
336
|
-
* Revert 2.1.11's Delayed Job change - caused issues in a handful of environments
|
|
337
|
-
|
|
338
|
-
# 2.1.11
|
|
339
|
-
|
|
340
|
-
* Support alternate methods of launching Delayed Job
|
|
341
|
-
|
|
342
|
-
# 2.1.10
|
|
343
|
-
|
|
344
|
-
* Fix issue getting a default Application Name when it wasn't explicitly set
|
|
345
|
-
|
|
346
|
-
# 2.1.9
|
|
347
|
-
|
|
348
|
-
* Send raw histograms of response time, enabling more accurate 95th %iles
|
|
349
|
-
* Raw histograms are used in Apdex calculations
|
|
350
|
-
* Gzip payloads
|
|
351
|
-
* Fix Mongoid (5.0) + Mongo (2.1) support
|
|
352
|
-
* Initial Delayed Job support
|
|
353
|
-
* Limit max metric size of a trace to 500.
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
# 2.1.8
|
|
357
|
-
|
|
358
|
-
* Adds Git revision detection, which is reported on app load and associated with transaction traces
|
|
359
|
-
|
|
360
|
-
# 2.1.7
|
|
361
|
-
|
|
362
|
-
* Fix allocations extension compilation on Ruby 1.8.7
|
|
3
|
+
* ScoutProf BETA
|
|
363
4
|
|
|
364
5
|
# 2.1.6
|
|
365
6
|
|
|
366
7
|
* Support older versions of Grape (0.10 onward)
|
|
8
|
+
* Fix issue with complex AR queries
|
|
367
9
|
* Vendor rusage library
|
|
368
10
|
* Fix double-exit that caused error messages when running under Passenger
|
|
369
11
|
|
|
@@ -738,7 +380,7 @@ Big set of features getting merged in for this release.
|
|
|
738
380
|
|
|
739
381
|
# 0.1.3
|
|
740
382
|
|
|
741
|
-
* Adds capacity calculation via "Instance/Capacity" metric.
|
|
383
|
+
* Adds capacity calculation via "Instance/Capacity" metric.
|
|
742
384
|
* Tweaks tracing to still count a transaction if it results in a 500 error and includes it in accumulated time.
|
|
743
385
|
* Adds per-transaction error tracking (ex: Errors/Controller/widgets/index)
|
|
744
386
|
|
data/Gemfile
CHANGED
|
@@ -1,17 +1,4 @@
|
|
|
1
|
-
source "
|
|
1
|
+
source "http://rubygems.org"
|
|
2
2
|
|
|
3
3
|
# Specify your gem's dependencies in scout_apm.gemspec
|
|
4
4
|
gemspec
|
|
5
|
-
|
|
6
|
-
# Pin development dependencies more conservatively for Ruby 1.8.7
|
|
7
|
-
if RUBY_VERSION <= "1.8.7"
|
|
8
|
-
gem "activesupport", "~> 3.2"
|
|
9
|
-
gem "i18n", "~> 0.6.11"
|
|
10
|
-
gem "pry", "~> 0.9.12"
|
|
11
|
-
gem "rake", "~> 10.5"
|
|
12
|
-
gem "minitest", "~> 5.11.3"
|
|
13
|
-
elsif RUBY_VERSION <= "1.9.3"
|
|
14
|
-
gem "rake", "~> 10.5"
|
|
15
|
-
else
|
|
16
|
-
gem "rake", ">= 12.3.3"
|
|
17
|
-
end
|
data/README.markdown
CHANGED
|
@@ -1,32 +1,14 @@
|
|
|
1
|
-
# ScoutApm
|
|
1
|
+
# ScoutApm
|
|
2
2
|
|
|
3
|
-
[
|
|
4
|
-
|
|
5
|
-
A Ruby gem for detailed Rails application performance monitoring 📈. Metrics and transaction traces are
|
|
6
|
-
reported to [Scout](https://scoutapp.com), a hosted application monitoring
|
|
7
|
-
service.
|
|
8
|
-
|
|
9
|
-
## What's the special sauce? 🤔
|
|
10
|
-
|
|
11
|
-
The Scout agent is engineered to do some wonderful things:
|
|
12
|
-
|
|
13
|
-
* A unique focus on identifying those hard-to-investigate outliers like memory bloat, N+1s, and user-specific problems. [See an example workflow](http://scoutapp.com/newrelic-alternative).
|
|
14
|
-
* [Low-overhead](http://blog.scoutapp.com/articles/2016/02/07/overhead-benchmarks-new-relic-vs-scout)
|
|
15
|
-
* View your performance metrics during development with [DevTrace](https://docs.scoutapm.com/#devtrace) and in production via [server_timing](https://github.com/scoutapp/ruby_server_timing).
|
|
16
|
-
* Production-Safe profiling of custom code via [ScoutProf](https://docs.scoutapm.com/#scoutprof) (BETA).
|
|
3
|
+
A Ruby gem for detailed Rails application performance analysis. Metrics are reported to [Scout](https://scoutapp.com), a hosted application monitoring service.
|
|
17
4
|
|
|
18
5
|
## Getting Started
|
|
19
6
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
gem 'scout_apm'
|
|
7
|
+
Install the gem:
|
|
23
8
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
Signup for a [Scout](https://scoutapm.com) account and put the provided
|
|
29
|
-
config file at `RAILS_ROOT/config/scout_apm.yml`.
|
|
9
|
+
gem install scout_apm
|
|
10
|
+
|
|
11
|
+
Signup for a [Scout](https://apm.scoutapp.com) account and copy the config file to `RAILS_ROOT/config/scout_apm.yml`.
|
|
30
12
|
|
|
31
13
|
Your config file should look like:
|
|
32
14
|
|
|
@@ -35,39 +17,12 @@ Your config file should look like:
|
|
|
35
17
|
key: YOUR_APPLICATION_KEY
|
|
36
18
|
monitor: true
|
|
37
19
|
|
|
38
|
-
test:
|
|
39
|
-
monitor: false
|
|
40
|
-
|
|
41
20
|
production:
|
|
42
21
|
<<: *defaults
|
|
43
22
|
|
|
44
|
-
## DevTrace Quickstart
|
|
45
|
-
|
|
46
|
-
To use DevTrace, our free, no-signup, in-browser development profiler:
|
|
47
|
-
|
|
48
|
-
1. Add the gem to your Gemfile:
|
|
49
|
-
|
|
50
|
-
```ruby
|
|
51
|
-
# Gemfile
|
|
52
|
-
gem 'scout_apm'
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
2. Start your Rails app with the SCOUT_DEV_TRACE environment variable:
|
|
56
|
-
|
|
57
|
-
```
|
|
58
|
-
SCOUT_DEV_TRACE=true rails server
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
## How to test gem locally
|
|
62
|
-
|
|
63
|
-
* Point your gemfile at your local checkout: `gem 'scout_apm', path: '/path/to/scout_apm_ruby`
|
|
64
|
-
* Compile native code: `cd /path/to/scout_apm_ruby && bundle exec rake compile`
|
|
65
|
-
|
|
66
|
-
|
|
67
23
|
## Docs
|
|
68
24
|
|
|
69
|
-
For the complete list of supported frameworks, Rubies,
|
|
70
|
-
and more, see our [help site](https://docs.scoutapm.com/).
|
|
25
|
+
For the complete list of supported frameworks, Rubies, etc, see our [help site](http://help.apm.scoutapp.com/).
|
|
71
26
|
|
|
72
27
|
## Help
|
|
73
28
|
|
data/Rakefile
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
#ifdef HAVE_RUBY_RUBY_H
|
|
2
1
|
#include <ruby/ruby.h>
|
|
3
|
-
#else // Ruby <= 1.8.7
|
|
4
|
-
#include <ruby.h>
|
|
5
|
-
#endif
|
|
6
2
|
|
|
7
3
|
VALUE mScoutApm;
|
|
8
4
|
VALUE mInstruments;
|
|
9
5
|
VALUE cAllocations;
|
|
10
6
|
|
|
11
|
-
#
|
|
7
|
+
#ifdef RUBY_INTERNAL_EVENT_NEWOBJ
|
|
12
8
|
|
|
13
9
|
#include <sys/resource.h> // is this needed?
|
|
14
10
|
#include <sys/time.h>
|
|
@@ -56,7 +52,6 @@ void Init_allocations()
|
|
|
56
52
|
mInstruments = rb_define_module_under(mScoutApm, "Instruments");
|
|
57
53
|
cAllocations = rb_define_class_under(mInstruments, "Allocations", rb_cObject);
|
|
58
54
|
rb_define_singleton_method(cAllocations, "count", get_allocation_count, 0);
|
|
59
|
-
rb_define_singleton_method(cAllocations, "count", get_allocation_count, 0);
|
|
60
55
|
rb_define_const(cAllocations, "ENABLED", Qtrue);
|
|
61
56
|
Init_hooks(mScoutApm);
|
|
62
57
|
}
|
|
@@ -79,7 +74,6 @@ void Init_allocations()
|
|
|
79
74
|
mInstruments = rb_define_module_under(mScoutApm, "Instruments");
|
|
80
75
|
cAllocations = rb_define_class_under(mInstruments, "Allocations", rb_cObject);
|
|
81
76
|
rb_define_singleton_method(cAllocations, "count", get_allocation_count, 0);
|
|
82
|
-
rb_define_singleton_method(cAllocations, "count", get_allocation_count, 0);
|
|
83
77
|
rb_define_const(cAllocations, "ENABLED", Qfalse);
|
|
84
78
|
Init_hooks(mScoutApm);
|
|
85
79
|
}
|
data/ext/allocations/extconf.rb
CHANGED
data/ext/rusage/rusage.c
CHANGED
|
@@ -1,35 +1,10 @@
|
|
|
1
1
|
// VERSION = "x.y.z"
|
|
2
2
|
#include <ruby.h>
|
|
3
|
-
#ifdef _WIN32
|
|
4
|
-
#define RUSAGE_SELF 0
|
|
5
|
-
#define RUSAGE_CHILDREN 0
|
|
6
|
-
#else
|
|
7
3
|
#include <sys/resource.h>
|
|
8
|
-
#endif
|
|
9
4
|
|
|
10
5
|
VALUE v_usage_struct;
|
|
11
6
|
|
|
12
7
|
static VALUE do_rusage_get(int who){
|
|
13
|
-
#ifdef _WIN32
|
|
14
|
-
return rb_struct_new(v_usage_struct,
|
|
15
|
-
rb_float_new(0),
|
|
16
|
-
rb_float_new(0),
|
|
17
|
-
LONG2NUM(0),
|
|
18
|
-
LONG2NUM(0),
|
|
19
|
-
LONG2NUM(0),
|
|
20
|
-
LONG2NUM(0),
|
|
21
|
-
LONG2NUM(0),
|
|
22
|
-
LONG2NUM(0),
|
|
23
|
-
LONG2NUM(0),
|
|
24
|
-
LONG2NUM(0),
|
|
25
|
-
LONG2NUM(0),
|
|
26
|
-
LONG2NUM(0),
|
|
27
|
-
LONG2NUM(0),
|
|
28
|
-
LONG2NUM(0),
|
|
29
|
-
LONG2NUM(0),
|
|
30
|
-
LONG2NUM(0)
|
|
31
|
-
);
|
|
32
|
-
#else // _WIN32
|
|
33
8
|
struct rusage r;
|
|
34
9
|
int ret;
|
|
35
10
|
|
|
@@ -55,7 +30,6 @@ static VALUE do_rusage_get(int who){
|
|
|
55
30
|
LONG2NUM(r.ru_nvcsw),
|
|
56
31
|
LONG2NUM(r.ru_nivcsw)
|
|
57
32
|
);
|
|
58
|
-
#endif // _WIN32
|
|
59
33
|
}
|
|
60
34
|
|
|
61
35
|
static VALUE rusage_get(int argc, VALUE* argv, VALUE mod){
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
begin
|
|
2
|
+
require 'mkmf'
|
|
3
|
+
can_compile = true
|
|
4
|
+
rescue Exception
|
|
5
|
+
# This will appear only in verbose mode.
|
|
6
|
+
$stderr.puts "Could not require 'mkmf'. Not fatal, the Stacks extension is optional."
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
can_compile &&= have_func('rb_postponed_job_register_one')
|
|
10
|
+
can_compile &&= have_func('rb_profile_frames')
|
|
11
|
+
can_compile &&= have_func('rb_profile_frame_absolute_path')
|
|
12
|
+
can_compile &&= have_func('rb_profile_frame_label')
|
|
13
|
+
can_compile &&= have_func('rb_profile_frame_classpath')
|
|
14
|
+
|
|
15
|
+
# Explicitly link against librt
|
|
16
|
+
if have_macro('__linux__')
|
|
17
|
+
can_compile &&= have_library('rt') # for timer_create, timer_settime
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
# Pick the atomics implementation
|
|
21
|
+
has_atomics_header = have_header("stdatomic.h")
|
|
22
|
+
if has_atomics_header
|
|
23
|
+
$defs.push "-DSCOUT_USE_NEW_ATOMICS"
|
|
24
|
+
else
|
|
25
|
+
$defs.push "-DSCOUT_USE_OLD_ATOMICS"
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
if can_compile
|
|
29
|
+
create_makefile('stacks')
|
|
30
|
+
else
|
|
31
|
+
# Create a dummy Makefile, to satisfy Gem::Installer#install
|
|
32
|
+
mfile = open("Makefile", "wb")
|
|
33
|
+
mfile.puts '.PHONY: install'
|
|
34
|
+
mfile.puts 'install:'
|
|
35
|
+
mfile.puts "\t" + '@echo "Stack extension not installed, skipping."'
|
|
36
|
+
mfile.close
|
|
37
|
+
end
|