scout_apm 5.1.1 → 5.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +22 -5
- data/CHANGELOG.markdown +32 -0
- data/gems/instruments.gemfile +6 -0
- data/gems/sidekiq.gemfile +4 -0
- data/lib/scout_apm/background_job_integrations/sidekiq.rb +2 -8
- data/lib/scout_apm/config.rb +16 -1
- data/lib/scout_apm/instrument_manager.rb +19 -1
- data/lib/scout_apm/instruments/action_controller_rails_2.rb +1 -1
- data/lib/scout_apm/instruments/action_controller_rails_3_rails4.rb +1 -1
- data/lib/scout_apm/instruments/action_view.rb +1 -1
- data/lib/scout_apm/instruments/active_record.rb +2 -2
- data/lib/scout_apm/instruments/elasticsearch.rb +91 -42
- data/lib/scout_apm/instruments/grape.rb +1 -1
- data/lib/scout_apm/instruments/http.rb +36 -16
- data/lib/scout_apm/instruments/http_client.rb +33 -14
- data/lib/scout_apm/instruments/influxdb.rb +2 -2
- data/lib/scout_apm/instruments/memcached.rb +26 -11
- data/lib/scout_apm/instruments/middleware_detailed.rb +1 -1
- data/lib/scout_apm/instruments/middleware_summary.rb +1 -1
- data/lib/scout_apm/instruments/mongoid.rb +1 -1
- data/lib/scout_apm/instruments/moped.rb +44 -19
- data/lib/scout_apm/instruments/net_http.rb +49 -21
- data/lib/scout_apm/instruments/rails_router.rb +1 -1
- data/lib/scout_apm/instruments/redis.rb +27 -12
- data/lib/scout_apm/instruments/redis5.rb +59 -0
- data/lib/scout_apm/instruments/sinatra.rb +1 -1
- data/lib/scout_apm/instruments/typhoeus.rb +1 -1
- data/lib/scout_apm/layer_converters/external_service_converter.rb +1 -1
- data/lib/scout_apm/server_integrations/puma.rb +29 -1
- data/lib/scout_apm/slow_request_policy.rb +1 -1
- data/lib/scout_apm/store.rb +6 -0
- data/lib/scout_apm/version.rb +1 -1
- data/lib/scout_apm.rb +1 -0
- data/test/test_helper.rb +26 -0
- data/test/unit/background_job_integrations/sidekiq_test.rb +17 -0
- data/test/unit/environment_test.rb +0 -28
- data/test/unit/instruments/active_record_test.rb +31 -1
- data/test/unit/instruments/http_client_test.rb +24 -0
- data/test/unit/instruments/http_test.rb +24 -0
- data/test/unit/instruments/moped_test.rb +24 -0
- data/test/unit/instruments/net_http_test.rb +11 -1
- data/test/unit/instruments/redis_test.rb +24 -0
- data/test/unit/instruments/typhoeus_test.rb +1 -1
- metadata +78 -7
@@ -0,0 +1,24 @@
|
|
1
|
+
if (ENV["SCOUT_TEST_FEATURES"] || "").include?("instruments")
|
2
|
+
require 'test_helper'
|
3
|
+
|
4
|
+
require 'scout_apm/instruments/redis5'
|
5
|
+
|
6
|
+
require 'redis'
|
7
|
+
|
8
|
+
class RedisTest < Minitest::Test
|
9
|
+
def setup
|
10
|
+
@context = ScoutApm::AgentContext.new
|
11
|
+
@instance = ScoutApm::Instruments::Redis5.new(@context)
|
12
|
+
@instrument_manager = ScoutApm::InstrumentManager.new(@context)
|
13
|
+
@instance.install(prepend: @instrument_manager.prepend_for_instrument?(@instance.class))
|
14
|
+
end
|
15
|
+
|
16
|
+
def test_installs_using_proper_method
|
17
|
+
if @instrument_manager.prepend_for_instrument?(@instance.class) == true
|
18
|
+
assert ::Redis::Client.ancestors.include?(ScoutApm::Instruments::Redis5ClientInstrumentationPrepend)
|
19
|
+
else
|
20
|
+
assert_equal false, ::Redis::Client.ancestors.include?(ScoutApm::Instruments::Redis5ClientInstrumentationPrepend)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -10,7 +10,7 @@ if (ENV["SCOUT_TEST_FEATURES"] || "").include?("typhoeus")
|
|
10
10
|
@context = ScoutApm::AgentContext.new
|
11
11
|
@recorder = FakeRecorder.new
|
12
12
|
ScoutApm::Agent.instance.context.recorder = @recorder
|
13
|
-
ScoutApm::Instruments::Typhoeus.new(@context).install
|
13
|
+
ScoutApm::Instruments::Typhoeus.new(@context).install(prepend: false)
|
14
14
|
end
|
15
15
|
|
16
16
|
def test_instruments_typhoeus_hydra
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scout_apm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Derek Haynes
|
8
8
|
- Andre Lewis
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2023-05-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: minitest
|
@@ -232,11 +232,13 @@ files:
|
|
232
232
|
- ext/rusage/extconf.rb
|
233
233
|
- ext/rusage/rusage.c
|
234
234
|
- gems/README.md
|
235
|
+
- gems/instruments.gemfile
|
235
236
|
- gems/octoshark.gemfile
|
236
237
|
- gems/rails3.gemfile
|
237
238
|
- gems/rails4.gemfile
|
238
239
|
- gems/rails5.gemfile
|
239
240
|
- gems/rails6.gemfile
|
241
|
+
- gems/sidekiq.gemfile
|
240
242
|
- gems/typhoeus.gemfile
|
241
243
|
- lib/scout_apm.rb
|
242
244
|
- lib/scout_apm/agent.rb
|
@@ -317,6 +319,7 @@ files:
|
|
317
319
|
- lib/scout_apm/instruments/process/process_memory.rb
|
318
320
|
- lib/scout_apm/instruments/rails_router.rb
|
319
321
|
- lib/scout_apm/instruments/redis.rb
|
322
|
+
- lib/scout_apm/instruments/redis5.rb
|
320
323
|
- lib/scout_apm/instruments/resque.rb
|
321
324
|
- lib/scout_apm/instruments/samplers.rb
|
322
325
|
- lib/scout_apm/instruments/sinatra.rb
|
@@ -440,8 +443,12 @@ files:
|
|
440
443
|
- test/unit/histogram_test.rb
|
441
444
|
- test/unit/ignored_uris_test.rb
|
442
445
|
- test/unit/instruments/active_record_test.rb
|
446
|
+
- test/unit/instruments/http_client_test.rb
|
447
|
+
- test/unit/instruments/http_test.rb
|
448
|
+
- test/unit/instruments/moped_test.rb
|
443
449
|
- test/unit/instruments/net_http_test.rb
|
444
450
|
- test/unit/instruments/percentile_sampler_test.rb
|
451
|
+
- test/unit/instruments/redis_test.rb
|
445
452
|
- test/unit/instruments/typhoeus_test.rb
|
446
453
|
- test/unit/layaway_test.rb
|
447
454
|
- test/unit/layer_children_set_test.rb
|
@@ -472,7 +479,7 @@ homepage: https://github.com/scoutapp/scout_apm_ruby
|
|
472
479
|
licenses:
|
473
480
|
- MIT
|
474
481
|
metadata: {}
|
475
|
-
post_install_message:
|
482
|
+
post_install_message:
|
476
483
|
rdoc_options: []
|
477
484
|
require_paths:
|
478
485
|
- lib
|
@@ -488,8 +495,72 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
488
495
|
- !ruby/object:Gem::Version
|
489
496
|
version: '0'
|
490
497
|
requirements: []
|
491
|
-
rubygems_version: 3.0.
|
492
|
-
signing_key:
|
498
|
+
rubygems_version: 3.0.8
|
499
|
+
signing_key:
|
493
500
|
specification_version: 4
|
494
501
|
summary: Ruby application performance monitoring
|
495
|
-
test_files:
|
502
|
+
test_files:
|
503
|
+
- test/data/config_test_1.yml
|
504
|
+
- test/test_helper.rb
|
505
|
+
- test/tmp/README.md
|
506
|
+
- test/unit/agent_context_test.rb
|
507
|
+
- test/unit/agent_test.rb
|
508
|
+
- test/unit/auto_instrument/anonymous_block_value.rb
|
509
|
+
- test/unit/auto_instrument/assignments-instrumented.rb
|
510
|
+
- test/unit/auto_instrument/assignments.rb
|
511
|
+
- test/unit/auto_instrument/controller-ast.txt
|
512
|
+
- test/unit/auto_instrument/controller-instrumented.rb
|
513
|
+
- test/unit/auto_instrument/controller.rb
|
514
|
+
- test/unit/auto_instrument/hanging_method.rb
|
515
|
+
- test/unit/auto_instrument/rescue_from-instrumented.rb
|
516
|
+
- test/unit/auto_instrument/rescue_from.rb
|
517
|
+
- test/unit/auto_instrument_test.rb
|
518
|
+
- test/unit/background_job_integrations/sidekiq_test.rb
|
519
|
+
- test/unit/config_test.rb
|
520
|
+
- test/unit/context_test.rb
|
521
|
+
- test/unit/db_query_metric_set_test.rb
|
522
|
+
- test/unit/db_query_metric_stats_test.rb
|
523
|
+
- test/unit/environment_test.rb
|
524
|
+
- test/unit/error_service/error_buffer_test.rb
|
525
|
+
- test/unit/error_service/ignored_exceptions_test.rb
|
526
|
+
- test/unit/extensions/periodic_callbacks_test.rb
|
527
|
+
- test/unit/extensions/transaction_callbacks_test.rb
|
528
|
+
- test/unit/external_service_metric_set_test.rb
|
529
|
+
- test/unit/external_service_metric_stats_test.rb
|
530
|
+
- test/unit/fake_store_test.rb
|
531
|
+
- test/unit/git_revision_test.rb
|
532
|
+
- test/unit/histogram_test.rb
|
533
|
+
- test/unit/ignored_uris_test.rb
|
534
|
+
- test/unit/instruments/active_record_test.rb
|
535
|
+
- test/unit/instruments/http_client_test.rb
|
536
|
+
- test/unit/instruments/http_test.rb
|
537
|
+
- test/unit/instruments/moped_test.rb
|
538
|
+
- test/unit/instruments/net_http_test.rb
|
539
|
+
- test/unit/instruments/percentile_sampler_test.rb
|
540
|
+
- test/unit/instruments/redis_test.rb
|
541
|
+
- test/unit/instruments/typhoeus_test.rb
|
542
|
+
- test/unit/layaway_test.rb
|
543
|
+
- test/unit/layer_children_set_test.rb
|
544
|
+
- test/unit/layer_converters/depth_first_walker_test.rb
|
545
|
+
- test/unit/layer_converters/metric_converter_test.rb
|
546
|
+
- test/unit/layer_converters/stubs.rb
|
547
|
+
- test/unit/limited_layer_test.rb
|
548
|
+
- test/unit/logger_test.rb
|
549
|
+
- test/unit/metric_set_test.rb
|
550
|
+
- test/unit/remote/message_test.rb
|
551
|
+
- test/unit/remote/route_test.rb
|
552
|
+
- test/unit/remote/server_test.rb
|
553
|
+
- test/unit/request_histograms_test.rb
|
554
|
+
- test/unit/scored_item_set_test.rb
|
555
|
+
- test/unit/serializers/payload_serializer_test.rb
|
556
|
+
- test/unit/slow_request_policy_test.rb
|
557
|
+
- test/unit/sql_sanitizer_test.rb
|
558
|
+
- test/unit/store_test.rb
|
559
|
+
- test/unit/tracer_test.rb
|
560
|
+
- test/unit/tracked_request_test.rb
|
561
|
+
- test/unit/transaction_test.rb
|
562
|
+
- test/unit/transaction_time_consumed_test.rb
|
563
|
+
- test/unit/utils/active_record_metric_name_test.rb
|
564
|
+
- test/unit/utils/backtrace_parser_test.rb
|
565
|
+
- test/unit/utils/numbers_test.rb
|
566
|
+
- test/unit/utils/scm.rb
|