scout_apm 6.0.0 → 6.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4c8fea1cfd66466534fa0ca5e7aaac6cdb332156e02a4e933d6fb883eb9fd68e
4
- data.tar.gz: d6f8ab26c4a7d77cde8f0f4fce2b1ef4f849635e839169fe9163e9b64b796294
3
+ metadata.gz: 2f7da6e5dce565451022406d4bbf06ccba3eb60cca723d391886083584595ca8
4
+ data.tar.gz: a9001c043e9f4b7afb9c556474e0b50baecbb191a05bc3b308f85072443df914
5
5
  SHA512:
6
- metadata.gz: 1d38a64cd133729432a38611167a4551e5ebb208eeddd1d346a5622d0484ba82a4fedb1ac14e385cc48671cd1902726350662202db35a88a28cbde9fb7613702
7
- data.tar.gz: 7755eb50a09652dba9fa4168893f51f3684b0f14c3fa681c8b2b0af3473eeb9d5b1cec98da46e49612b9f490bc5e9355a187d8658ced8616af0d6d0ad2bdef25
6
+ metadata.gz: 39de9f2fe98871ab474a43c784c9db73a800832e5ac6757004036065c0ea9f68955f36e953fa36249d5ce7d78c289aa9e373d8f01fe83c22c6987bd149eeab34
7
+ data.tar.gz: 588d9fad7ad1fe3084ed28b2ce9565cda61eb694389bfefae3f065ace19f09b463c5de801766ab105540385350ed8d8ee2e6be545842794b8f60821cc2f0d5b1
data/CHANGELOG.markdown CHANGED
@@ -1,3 +1,6 @@
1
+ # 6.0.1
2
+ - Fix capturing of job params for non ActiveJob
3
+
1
4
  # 6.0.0
2
5
  - Add Prism AutoInstruments Support (#582) (#594)
3
6
  - Add OpenSearch instrumentation (#563)
@@ -153,13 +153,16 @@ module ScoutApm
153
153
 
154
154
  return if known_parameters.empty?
155
155
 
156
- arguments = msg.fetch('args', [])
157
-
158
- # Don't think this can actually happen. With perform_all_later,
159
- # it appears we go through this middleware individually (even with multiples of the same job type).
160
- return if arguments.length > 1
156
+ job_args = if msg["class"] == ACTIVE_JOB_KLASS
157
+ arguments = msg.fetch('args', [])
158
+ # Don't think this can actually happen. With perform_all_later,
159
+ # it appears we go through this middleware individually (even with multiples of the same job type).
160
+ return if arguments.length > 1
161
161
 
162
- job_args = arguments.first.fetch('arguments', [])
162
+ arguments.first.fetch('arguments', [])
163
+ else
164
+ msg.fetch('args', [])
165
+ end
163
166
 
164
167
  # Reduce known parameters to just the ones that are present in the job arguments (excluding non altered optional params)
165
168
  known_parameters = known_parameters[0...job_args.length]
@@ -1,3 +1,3 @@
1
1
  module ScoutApm
2
- VERSION = "6.0.0"
2
+ VERSION = "6.0.1"
3
3
  end
@@ -153,7 +153,8 @@ class SidekiqTest < Minitest::Test
153
153
  ScoutApm::Context.expects(:add).with({ user_id: 123, email: 'test@example.com', filter_param: '[FILTERED]', dict_val: '[UNSUPPORTED TYPE]' })
154
154
 
155
155
  msg = {
156
- 'class' => 'TestJobWithArgs',
156
+ "class" => SidekiqMiddleware::ACTIVE_JOB_KLASS,
157
+ "wrapped" => "TestJobWithArgs",
157
158
  'args' => [{ 'arguments' => [123, 'test@example.com', 'secret', {a: 1}] }]
158
159
  }
159
160
 
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: 6.0.0
4
+ version: 6.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derek Haynes