scout_apm 5.1.1 → 5.2.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/test.yml +3 -0
- data/CHANGELOG.markdown +4 -0
- data/gems/sidekiq.gemfile +4 -0
- data/lib/scout_apm/background_job_integrations/sidekiq.rb +2 -8
- data/lib/scout_apm/store.rb +6 -0
- data/lib/scout_apm/version.rb +1 -1
- data/test/unit/background_job_integrations/sidekiq_test.rb +17 -0
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81ad3b683899407ed049b7267d6d79a84d5afac011445d1078f4342c345c7ace
|
4
|
+
data.tar.gz: 29e141854923fa21c57ca3fcc7ca9e4cc96dbd741c36c0586e7fd2cd7a8186f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a857678f6d91c709fbbdfb30409339f37e99cd83260cec9d3808f81638245de03cf4b0721270203f0ee619cc56b06fc3baa795a10e859c3068e0e2c36a2247b2
|
7
|
+
data.tar.gz: 972da0997d251c5704291e60e390916a417de3036aadcada469540acd20520f4edd95b3b76da9202734755bc37c3a9a22e44916c23e74c9199d3c6a7a2447797
|
data/.github/workflows/test.yml
CHANGED
data/CHANGELOG.markdown
CHANGED
@@ -37,17 +37,11 @@ module ScoutApm
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def install_processor
|
40
|
-
|
41
|
-
|
42
|
-
::Sidekiq::Processor.class_eval do
|
43
|
-
def initialize_with_scout(*args)
|
40
|
+
::Sidekiq.configure_server do |config|
|
41
|
+
config.on(:startup) do
|
44
42
|
agent = ::ScoutApm::Agent.instance
|
45
43
|
agent.start
|
46
|
-
initialize_without_scout(*args)
|
47
44
|
end
|
48
|
-
|
49
|
-
alias_method :initialize_without_scout, :initialize
|
50
|
-
alias_method :initialize, :initialize_with_scout
|
51
45
|
end
|
52
46
|
end
|
53
47
|
end
|
data/lib/scout_apm/store.rb
CHANGED
@@ -217,6 +217,7 @@ module ScoutApm
|
|
217
217
|
|
218
218
|
def initialize(timestamp, context)
|
219
219
|
@timestamp = timestamp
|
220
|
+
@context = context
|
220
221
|
|
221
222
|
@request_traces = ScoredItemSet.new(context.config.value('max_traces'))
|
222
223
|
@job_traces = ScoredItemSet.new(context.config.value('max_traces'))
|
@@ -230,6 +231,11 @@ module ScoutApm
|
|
230
231
|
@jobs = Hash.new
|
231
232
|
end
|
232
233
|
|
234
|
+
def logger
|
235
|
+
@context.logger
|
236
|
+
end
|
237
|
+
private :logger
|
238
|
+
|
233
239
|
# Merges another StoreReportingPeriod into this one
|
234
240
|
def merge(other)
|
235
241
|
self.
|
data/lib/scout_apm/version.rb
CHANGED
@@ -3,8 +3,25 @@ require 'scout_apm/request_manager'
|
|
3
3
|
require 'scout_apm/background_job_integrations/sidekiq'
|
4
4
|
|
5
5
|
class SidekiqTest < Minitest::Test
|
6
|
+
SidekiqIntegration = ScoutApm::BackgroundJobIntegrations::Sidekiq
|
6
7
|
SidekiqMiddleware = ScoutApm::BackgroundJobIntegrations::SidekiqMiddleware
|
7
8
|
|
9
|
+
########################################
|
10
|
+
# Install
|
11
|
+
########################################
|
12
|
+
if (ENV["SCOUT_TEST_FEATURES"] || "").include?("sidekiq_install")
|
13
|
+
require 'sidekiq'
|
14
|
+
|
15
|
+
# Sidekiq::CLI needs to be defined in order for `Sidekiq.configure_server` to work
|
16
|
+
Sidekiq::CLI = nil
|
17
|
+
|
18
|
+
def test_starts_on_startup
|
19
|
+
::ScoutApm::Agent.any_instance.expects(:start)
|
20
|
+
SidekiqIntegration.new.install
|
21
|
+
Sidekiq.options[:lifecycle_events][:startup].map(&:call)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
8
25
|
########################################
|
9
26
|
# Middleware
|
10
27
|
########################################
|
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.2.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:
|
12
|
+
date: 2022-06-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: minitest
|
@@ -237,6 +237,7 @@ files:
|
|
237
237
|
- gems/rails4.gemfile
|
238
238
|
- gems/rails5.gemfile
|
239
239
|
- gems/rails6.gemfile
|
240
|
+
- gems/sidekiq.gemfile
|
240
241
|
- gems/typhoeus.gemfile
|
241
242
|
- lib/scout_apm.rb
|
242
243
|
- lib/scout_apm/agent.rb
|
@@ -472,7 +473,7 @@ homepage: https://github.com/scoutapp/scout_apm_ruby
|
|
472
473
|
licenses:
|
473
474
|
- MIT
|
474
475
|
metadata: {}
|
475
|
-
post_install_message:
|
476
|
+
post_install_message:
|
476
477
|
rdoc_options: []
|
477
478
|
require_paths:
|
478
479
|
- lib
|
@@ -488,8 +489,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
488
489
|
- !ruby/object:Gem::Version
|
489
490
|
version: '0'
|
490
491
|
requirements: []
|
491
|
-
rubygems_version: 3.
|
492
|
-
signing_key:
|
492
|
+
rubygems_version: 3.3.7
|
493
|
+
signing_key:
|
493
494
|
specification_version: 4
|
494
495
|
summary: Ruby application performance monitoring
|
495
496
|
test_files: []
|