scout_apm 5.3.8 → 5.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/release.yml +30 -0
- data/.github/workflows/test.yml +4 -5
- data/CHANGELOG.markdown +4 -0
- data/gems/sqlite3-1.3.gemfile +3 -0
- data/lib/scout_apm/background_job_integrations/good_job.rb +49 -0
- data/lib/scout_apm/background_job_integrations/solid_queue.rb +47 -0
- data/lib/scout_apm/environment.rb +2 -0
- data/lib/scout_apm/version.rb +1 -1
- data/lib/scout_apm.rb +2 -0
- data/scout_apm.gemspec +1 -1
- metadata +15 -81
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e125a347fd3bbfa0b52f6dde597daf1dc95d97ba95cb6c44553bc36fae71b82
|
4
|
+
data.tar.gz: 9f0c708e386be527f255582195a791938c1663b418999816b79f25e4f7caaf6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7e079bde40861cf673834ec606f8a09fc84bd4416eddccd22abd29d5cd64dbf071347d832549f840dd3b07026c8a3d4e6788f458587128482a1b44682479ec4
|
7
|
+
data.tar.gz: e20c7d5fadbfe008f1febb62e3e31e5aa23cc4410f02634329493b10159603fb467e4ae66d504709f247ff457b0bf5d386f62baa0835010e7e5a0954160f7b97
|
@@ -0,0 +1,30 @@
|
|
1
|
+
name: Release Gem
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
tags:
|
6
|
+
- 'v*'
|
7
|
+
|
8
|
+
# Directly from https://github.com/rubygems/release-gem/tree/v1
|
9
|
+
# Predicated on Tag Ruleset preventing arbitrary tag creation and
|
10
|
+
# requiring checks to pass for commit before tag creation
|
11
|
+
jobs:
|
12
|
+
push:
|
13
|
+
name: Push gem to RubyGems.org
|
14
|
+
runs-on: ubuntu-latest
|
15
|
+
|
16
|
+
permissions:
|
17
|
+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
|
18
|
+
contents: write # IMPORTANT: this permission is required for `rake release` to push the release tag
|
19
|
+
|
20
|
+
steps:
|
21
|
+
# Set up
|
22
|
+
- uses: actions/checkout@v4
|
23
|
+
- name: Set up Ruby
|
24
|
+
uses: ruby/setup-ruby@v1
|
25
|
+
with:
|
26
|
+
bundler-cache: true
|
27
|
+
ruby-version: ruby
|
28
|
+
|
29
|
+
# Release
|
30
|
+
- uses: rubygems/release-gem@v1
|
data/.github/workflows/test.yml
CHANGED
@@ -7,7 +7,7 @@ jobs:
|
|
7
7
|
runs-on: ubuntu-latest
|
8
8
|
|
9
9
|
steps:
|
10
|
-
- uses: actions/checkout@
|
10
|
+
- uses: actions/checkout@v4
|
11
11
|
- uses: ruby/setup-ruby@v1
|
12
12
|
with:
|
13
13
|
bundler-cache: true
|
@@ -23,7 +23,9 @@ jobs:
|
|
23
23
|
gemfile: gems/rails3.gemfile
|
24
24
|
- ruby: 2.2
|
25
25
|
- ruby: 2.3
|
26
|
+
gemfile: gems/sqlite3-1.3.gemfile
|
26
27
|
- ruby: 2.4
|
28
|
+
gemfile: gems/sqlite3-1.3.gemfile
|
27
29
|
- ruby: 2.5
|
28
30
|
- ruby: 2.6
|
29
31
|
- ruby: 2.6
|
@@ -31,9 +33,6 @@ jobs:
|
|
31
33
|
test_features: "typhoeus"
|
32
34
|
- ruby: 2.6
|
33
35
|
gemfile: gems/octoshark.gemfile
|
34
|
-
- ruby: 2.6
|
35
|
-
gemfile: gems/rails3.gemfile
|
36
|
-
bundler: 1.17.3
|
37
36
|
- ruby: 2.7
|
38
37
|
- ruby: 2.7
|
39
38
|
prepend: true
|
@@ -61,7 +60,7 @@ jobs:
|
|
61
60
|
runs-on: ${{ matrix.ruby == '2.2' && 'ubuntu-20.04' || 'ubuntu-latest' }}
|
62
61
|
|
63
62
|
steps:
|
64
|
-
- uses: actions/checkout@
|
63
|
+
- uses: actions/checkout@v4
|
65
64
|
- uses: ruby/setup-ruby@v1
|
66
65
|
with:
|
67
66
|
bundler-cache: true
|
data/CHANGELOG.markdown
CHANGED
@@ -0,0 +1,49 @@
|
|
1
|
+
module ScoutApm
|
2
|
+
module BackgroundJobIntegrations
|
3
|
+
class GoodJob
|
4
|
+
UNKNOWN_QUEUE_PLACEHOLDER = 'default'.freeze
|
5
|
+
attr_reader :logger
|
6
|
+
|
7
|
+
def name
|
8
|
+
:good_job
|
9
|
+
end
|
10
|
+
|
11
|
+
def present?
|
12
|
+
defined?(::GoodJob::VERSION)
|
13
|
+
end
|
14
|
+
|
15
|
+
def forking?
|
16
|
+
false
|
17
|
+
end
|
18
|
+
|
19
|
+
def install
|
20
|
+
ActiveSupport.on_load(:active_job) do
|
21
|
+
include ScoutApm::Tracer
|
22
|
+
|
23
|
+
around_perform do |job, block|
|
24
|
+
# I have a sneaking suspicion there is a better way to handle Agent starting
|
25
|
+
# Maybe hook into GoodJob lifecycle events?
|
26
|
+
req = ScoutApm::RequestManager.lookup
|
27
|
+
latency = Time.now - (job.scheduled_at || job.enqueued_at) rescue 0
|
28
|
+
req.annotate_request(queue_latency: latency)
|
29
|
+
|
30
|
+
begin
|
31
|
+
req.start_layer ScoutApm::Layer.new("Queue", job.queue_name.presence || UNKNOWN_QUEUE_PLACEHOLDER)
|
32
|
+
started_queue = true # Following Convention
|
33
|
+
req.start_layer ScoutApm::Layer.new("Job", job.class.name)
|
34
|
+
started_job = true # Following Convention
|
35
|
+
|
36
|
+
block.call
|
37
|
+
rescue
|
38
|
+
req.error!
|
39
|
+
raise
|
40
|
+
ensure
|
41
|
+
req.stop_layer if started_job
|
42
|
+
req.stop_layer if started_queue
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
module ScoutApm
|
2
|
+
module BackgroundJobIntegrations
|
3
|
+
class SolidQueue
|
4
|
+
UNKNOWN_QUEUE_PLACEHOLDER = 'default'.freeze
|
5
|
+
attr_reader :logger
|
6
|
+
|
7
|
+
def name
|
8
|
+
:solid_queue
|
9
|
+
end
|
10
|
+
|
11
|
+
def present?
|
12
|
+
defined?(::SolidQueue::VERSION)
|
13
|
+
end
|
14
|
+
|
15
|
+
def forking?
|
16
|
+
false
|
17
|
+
end
|
18
|
+
|
19
|
+
def install
|
20
|
+
ActiveSupport.on_load(:active_job) do
|
21
|
+
include ScoutApm::Tracer
|
22
|
+
|
23
|
+
around_perform do |job, block|
|
24
|
+
req = ScoutApm::RequestManager.lookup
|
25
|
+
latency = Time.now - (job.scheduled_at || job.enqueued_at) rescue 0
|
26
|
+
req.annotate_request(queue_latency: latency)
|
27
|
+
|
28
|
+
begin
|
29
|
+
req.start_layer ScoutApm::Layer.new("Queue", job.queue_name.presence || UNKNOWN_QUEUE_PLACEHOLDER)
|
30
|
+
started_queue = true # Following Convention
|
31
|
+
req.start_layer ScoutApm::Layer.new("Job", job.class.name)
|
32
|
+
started_job = true # Following Convention
|
33
|
+
|
34
|
+
block.call
|
35
|
+
rescue
|
36
|
+
req.error!
|
37
|
+
raise
|
38
|
+
ensure
|
39
|
+
req.stop_layer if started_job
|
40
|
+
req.stop_layer if started_queue
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -31,6 +31,8 @@ module ScoutApm
|
|
31
31
|
ScoutApm::BackgroundJobIntegrations::DelayedJob.new,
|
32
32
|
ScoutApm::BackgroundJobIntegrations::Que.new,
|
33
33
|
ScoutApm::BackgroundJobIntegrations::Faktory.new,
|
34
|
+
ScoutApm::BackgroundJobIntegrations::GoodJob.new,
|
35
|
+
ScoutApm::BackgroundJobIntegrations::SolidQueue.new,
|
34
36
|
]
|
35
37
|
|
36
38
|
FRAMEWORK_INTEGRATIONS = [
|
data/lib/scout_apm/version.rb
CHANGED
data/lib/scout_apm.rb
CHANGED
@@ -67,6 +67,8 @@ require 'scout_apm/background_job_integrations/shoryuken'
|
|
67
67
|
require 'scout_apm/background_job_integrations/sneakers'
|
68
68
|
require 'scout_apm/background_job_integrations/que'
|
69
69
|
require 'scout_apm/background_job_integrations/legacy_sneakers'
|
70
|
+
require 'scout_apm/background_job_integrations/good_job'
|
71
|
+
require 'scout_apm/background_job_integrations/solid_queue'
|
70
72
|
|
71
73
|
require 'scout_apm/framework_integrations/rails_2'
|
72
74
|
require 'scout_apm/framework_integrations/rails_3_or_4'
|
data/scout_apm.gemspec
CHANGED
@@ -34,7 +34,7 @@ Gem::Specification.new do |s|
|
|
34
34
|
# tests. Specific versions are pulled in using specific gemfiles, e.g.
|
35
35
|
# `gems/rails3.gemfile`.
|
36
36
|
s.add_development_dependency "activerecord"
|
37
|
-
s.add_development_dependency "sqlite3"
|
37
|
+
s.add_development_dependency "sqlite3", "~> 1.4"
|
38
38
|
|
39
39
|
s.add_development_dependency "rubocop"
|
40
40
|
s.add_development_dependency "guard"
|
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.4.0
|
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: 2024-
|
12
|
+
date: 2024-09-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: minitest
|
@@ -141,16 +141,16 @@ dependencies:
|
|
141
141
|
name: sqlite3
|
142
142
|
requirement: !ruby/object:Gem::Requirement
|
143
143
|
requirements:
|
144
|
-
- - "
|
144
|
+
- - "~>"
|
145
145
|
- !ruby/object:Gem::Version
|
146
|
-
version: '
|
146
|
+
version: '1.4'
|
147
147
|
type: :development
|
148
148
|
prerelease: false
|
149
149
|
version_requirements: !ruby/object:Gem::Requirement
|
150
150
|
requirements:
|
151
|
-
- - "
|
151
|
+
- - "~>"
|
152
152
|
- !ruby/object:Gem::Version
|
153
|
-
version: '
|
153
|
+
version: '1.4'
|
154
154
|
- !ruby/object:Gem::Dependency
|
155
155
|
name: rubocop
|
156
156
|
requirement: !ruby/object:Gem::Requirement
|
@@ -216,6 +216,7 @@ extensions:
|
|
216
216
|
- ext/rusage/extconf.rb
|
217
217
|
extra_rdoc_files: []
|
218
218
|
files:
|
219
|
+
- ".github/workflows/release.yml"
|
219
220
|
- ".github/workflows/test.yml"
|
220
221
|
- ".gitignore"
|
221
222
|
- ".rubocop.yml"
|
@@ -239,6 +240,7 @@ files:
|
|
239
240
|
- gems/rails5.gemfile
|
240
241
|
- gems/rails6.gemfile
|
241
242
|
- gems/sidekiq.gemfile
|
243
|
+
- gems/sqlite3-1.3.gemfile
|
242
244
|
- gems/typhoeus.gemfile
|
243
245
|
- lib/scout_apm.rb
|
244
246
|
- lib/scout_apm/agent.rb
|
@@ -254,12 +256,14 @@ files:
|
|
254
256
|
- lib/scout_apm/auto_instrument/rails.rb
|
255
257
|
- lib/scout_apm/background_job_integrations/delayed_job.rb
|
256
258
|
- lib/scout_apm/background_job_integrations/faktory.rb
|
259
|
+
- lib/scout_apm/background_job_integrations/good_job.rb
|
257
260
|
- lib/scout_apm/background_job_integrations/legacy_sneakers.rb
|
258
261
|
- lib/scout_apm/background_job_integrations/que.rb
|
259
262
|
- lib/scout_apm/background_job_integrations/resque.rb
|
260
263
|
- lib/scout_apm/background_job_integrations/shoryuken.rb
|
261
264
|
- lib/scout_apm/background_job_integrations/sidekiq.rb
|
262
265
|
- lib/scout_apm/background_job_integrations/sneakers.rb
|
266
|
+
- lib/scout_apm/background_job_integrations/solid_queue.rb
|
263
267
|
- lib/scout_apm/background_recorder.rb
|
264
268
|
- lib/scout_apm/background_worker.rb
|
265
269
|
- lib/scout_apm/bucket_name_splitter.rb
|
@@ -485,7 +489,7 @@ homepage: https://github.com/scoutapp/scout_apm_ruby
|
|
485
489
|
licenses:
|
486
490
|
- MIT
|
487
491
|
metadata: {}
|
488
|
-
post_install_message:
|
492
|
+
post_install_message:
|
489
493
|
rdoc_options: []
|
490
494
|
require_paths:
|
491
495
|
- lib
|
@@ -501,78 +505,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
501
505
|
- !ruby/object:Gem::Version
|
502
506
|
version: '0'
|
503
507
|
requirements: []
|
504
|
-
rubygems_version: 3.
|
505
|
-
signing_key:
|
508
|
+
rubygems_version: 3.5.16
|
509
|
+
signing_key:
|
506
510
|
specification_version: 4
|
507
511
|
summary: Ruby application performance monitoring
|
508
|
-
test_files:
|
509
|
-
- test/data/config_test_1.yml
|
510
|
-
- test/test_helper.rb
|
511
|
-
- test/tmp/README.md
|
512
|
-
- test/unit/agent_context_test.rb
|
513
|
-
- test/unit/agent_test.rb
|
514
|
-
- test/unit/auto_instrument/anonymous_block_value.rb
|
515
|
-
- test/unit/auto_instrument/assignments-instrumented.rb
|
516
|
-
- test/unit/auto_instrument/assignments.rb
|
517
|
-
- test/unit/auto_instrument/controller-ast.txt
|
518
|
-
- test/unit/auto_instrument/controller-instrumented.rb
|
519
|
-
- test/unit/auto_instrument/controller.rb
|
520
|
-
- test/unit/auto_instrument/hanging_method.rb
|
521
|
-
- test/unit/auto_instrument/hash_shorthand_controller-instrumented.rb
|
522
|
-
- test/unit/auto_instrument/hash_shorthand_controller.rb
|
523
|
-
- test/unit/auto_instrument/rescue_from-instrumented.rb
|
524
|
-
- test/unit/auto_instrument/rescue_from.rb
|
525
|
-
- test/unit/auto_instrument_test.rb
|
526
|
-
- test/unit/background_job_integrations/sidekiq_test.rb
|
527
|
-
- test/unit/config_test.rb
|
528
|
-
- test/unit/context_test.rb
|
529
|
-
- test/unit/db_query_metric_set_test.rb
|
530
|
-
- test/unit/db_query_metric_stats_test.rb
|
531
|
-
- test/unit/environment_test.rb
|
532
|
-
- test/unit/error_service/error_buffer_test.rb
|
533
|
-
- test/unit/error_service/ignored_exceptions_test.rb
|
534
|
-
- test/unit/extensions/periodic_callbacks_test.rb
|
535
|
-
- test/unit/extensions/transaction_callbacks_test.rb
|
536
|
-
- test/unit/external_service_metric_set_test.rb
|
537
|
-
- test/unit/external_service_metric_stats_test.rb
|
538
|
-
- test/unit/fake_store_test.rb
|
539
|
-
- test/unit/git_revision_test.rb
|
540
|
-
- test/unit/histogram_test.rb
|
541
|
-
- test/unit/ignored_uris_test.rb
|
542
|
-
- test/unit/instruments/action_view_test.rb
|
543
|
-
- test/unit/instruments/active_record_test.rb
|
544
|
-
- test/unit/instruments/fixtures/test/_test_partial.html.erb
|
545
|
-
- test/unit/instruments/fixtures/test/_test_partial_collection.html.erb
|
546
|
-
- test/unit/instruments/fixtures/test_view.html.erb
|
547
|
-
- test/unit/instruments/http_client_test.rb
|
548
|
-
- test/unit/instruments/http_test.rb
|
549
|
-
- test/unit/instruments/moped_test.rb
|
550
|
-
- test/unit/instruments/net_http_test.rb
|
551
|
-
- test/unit/instruments/percentile_sampler_test.rb
|
552
|
-
- test/unit/instruments/redis_test.rb
|
553
|
-
- test/unit/instruments/typhoeus_test.rb
|
554
|
-
- test/unit/layaway_test.rb
|
555
|
-
- test/unit/layer_children_set_test.rb
|
556
|
-
- test/unit/layer_converters/depth_first_walker_test.rb
|
557
|
-
- test/unit/layer_converters/metric_converter_test.rb
|
558
|
-
- test/unit/layer_converters/stubs.rb
|
559
|
-
- test/unit/limited_layer_test.rb
|
560
|
-
- test/unit/logger_test.rb
|
561
|
-
- test/unit/metric_set_test.rb
|
562
|
-
- test/unit/remote/message_test.rb
|
563
|
-
- test/unit/remote/route_test.rb
|
564
|
-
- test/unit/remote/server_test.rb
|
565
|
-
- test/unit/request_histograms_test.rb
|
566
|
-
- test/unit/scored_item_set_test.rb
|
567
|
-
- test/unit/serializers/payload_serializer_test.rb
|
568
|
-
- test/unit/slow_request_policy_test.rb
|
569
|
-
- test/unit/sql_sanitizer_test.rb
|
570
|
-
- test/unit/store_test.rb
|
571
|
-
- test/unit/tracer_test.rb
|
572
|
-
- test/unit/tracked_request_test.rb
|
573
|
-
- test/unit/transaction_test.rb
|
574
|
-
- test/unit/transaction_time_consumed_test.rb
|
575
|
-
- test/unit/utils/active_record_metric_name_test.rb
|
576
|
-
- test/unit/utils/backtrace_parser_test.rb
|
577
|
-
- test/unit/utils/numbers_test.rb
|
578
|
-
- test/unit/utils/scm.rb
|
512
|
+
test_files: []
|