sentry-sidekiq 7.1.0 → 7.3.0

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.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +17 -1
  3. data/Rakefile +21 -8
  4. data/gemfiles/ruby-2.7_sidekiq-5.0.gemfile.lock +18 -18
  5. data/gemfiles/ruby-2.7_sidekiq-6.5.gemfile.lock +18 -18
  6. data/gemfiles/ruby-2.7_sidekiq-7.0.gemfile.lock +19 -19
  7. data/gemfiles/ruby-3.0_sidekiq-5.0.gemfile.lock +17 -17
  8. data/gemfiles/ruby-3.0_sidekiq-6.5.gemfile.lock +17 -17
  9. data/gemfiles/ruby-3.0_sidekiq-7.0.gemfile.lock +18 -18
  10. data/gemfiles/ruby-3.1_sidekiq-5.0.gemfile.lock +99 -99
  11. data/gemfiles/ruby-3.1_sidekiq-6.5.gemfile.lock +99 -99
  12. data/gemfiles/ruby-3.1_sidekiq-7.0.gemfile.lock +101 -101
  13. data/gemfiles/ruby-3.2_sidekiq-5.0.gemfile.lock +134 -134
  14. data/gemfiles/ruby-3.2_sidekiq-6.5.gemfile.lock +134 -134
  15. data/gemfiles/ruby-3.2_sidekiq-7.0.gemfile.lock +136 -136
  16. data/gemfiles/ruby-3.2_sidekiq-8.0.0.gemfile.lock +136 -136
  17. data/gemfiles/ruby-3.3_sidekiq-5.0.gemfile.lock +136 -136
  18. data/gemfiles/ruby-3.3_sidekiq-6.5.gemfile.lock +136 -136
  19. data/gemfiles/ruby-3.3_sidekiq-7.0.gemfile.lock +138 -138
  20. data/gemfiles/ruby-3.3_sidekiq-8.0.0.gemfile.lock +138 -138
  21. data/gemfiles/ruby-3.4_sidekiq-5.0.gemfile.lock +136 -136
  22. data/gemfiles/ruby-3.4_sidekiq-6.5.gemfile.lock +136 -136
  23. data/gemfiles/ruby-3.4_sidekiq-7.0.gemfile.lock +138 -138
  24. data/gemfiles/ruby-3.4_sidekiq-8.0.0.gemfile.lock +138 -138
  25. data/gemfiles/ruby-4.0_sidekiq-5.0.gemfile.lock +136 -136
  26. data/gemfiles/ruby-4.0_sidekiq-6.5.gemfile.lock +136 -136
  27. data/gemfiles/ruby-4.0_sidekiq-7.0.gemfile.lock +138 -138
  28. data/gemfiles/ruby-jruby-9.4.14.0_sidekiq-5.0.gemfile.lock +103 -103
  29. data/gemfiles/ruby-jruby-9.4.14.0_sidekiq-6.5.gemfile.lock +103 -103
  30. data/gemfiles/ruby-jruby-9.4.14.0_sidekiq-6.gemfile.lock +103 -103
  31. data/gemfiles/ruby-jruby-9.4.14.0_sidekiq-7.0.gemfile.lock +105 -105
  32. data/lib/sentry/sidekiq/active_job_extension.rb +44 -0
  33. data/lib/sentry/sidekiq/active_job_support/job_extension.rb +75 -0
  34. data/lib/sentry/sidekiq/active_job_support/server_middleware.rb +25 -0
  35. data/lib/sentry/sidekiq/context_filter.rb +4 -45
  36. data/lib/sentry/sidekiq/error_handler.rb +10 -71
  37. data/lib/sentry/sidekiq/failure_reporting.rb +49 -0
  38. data/lib/sentry/sidekiq/job_extension.rb +168 -0
  39. data/lib/sentry/sidekiq/railtie.rb +28 -0
  40. data/lib/sentry/sidekiq/retry_policy.rb +100 -0
  41. data/lib/sentry/sidekiq/sentry_context_middleware.rb +30 -81
  42. data/lib/sentry/sidekiq/version.rb +1 -1
  43. data/lib/sentry/sidekiq-scheduler/scheduler.rb +40 -0
  44. data/lib/sentry-sidekiq.rb +26 -7
  45. data/sentry-sidekiq.gemspec +1 -1
  46. metadata +15 -8
@@ -6,14 +6,14 @@ GIT
6
6
  PATH
7
7
  remote: ../../sentry-rails
8
8
  specs:
9
- sentry-rails (7.0.0)
9
+ sentry-rails (7.2.0)
10
10
  railties (>= 5.2.0)
11
- sentry-ruby (~> 7.0.0)
11
+ sentry-ruby (~> 7.2.0)
12
12
 
13
13
  PATH
14
14
  remote: ../../sentry-ruby
15
15
  specs:
16
- sentry-ruby (7.0.0)
16
+ sentry-ruby (7.2.0)
17
17
  bigdecimal
18
18
  concurrent-ruby (~> 1.0, >= 1.0.2)
19
19
  logger
@@ -21,36 +21,36 @@ PATH
21
21
  PATH
22
22
  remote: ..
23
23
  specs:
24
- sentry-sidekiq (7.0.0)
25
- sentry-ruby (~> 7.0.0)
24
+ sentry-sidekiq (7.2.0)
25
+ sentry-ruby (~> 7.2.0)
26
26
  sidekiq (>= 5.0)
27
27
 
28
28
  GEM
29
29
  remote: https://rubygems.org/
30
30
  specs:
31
- actioncable (7.2.3.2)
32
- actionpack (= 7.2.3.2)
33
- activesupport (= 7.2.3.2)
31
+ actioncable (7.2.4)
32
+ actionpack (= 7.2.4)
33
+ activesupport (= 7.2.4)
34
34
  nio4r (~> 2.0)
35
35
  websocket-driver (>= 0.6.1)
36
36
  zeitwerk (~> 2.6)
37
- actionmailbox (7.2.3.2)
38
- actionpack (= 7.2.3.2)
39
- activejob (= 7.2.3.2)
40
- activerecord (= 7.2.3.2)
41
- activestorage (= 7.2.3.2)
42
- activesupport (= 7.2.3.2)
37
+ actionmailbox (7.2.4)
38
+ actionpack (= 7.2.4)
39
+ activejob (= 7.2.4)
40
+ activerecord (= 7.2.4)
41
+ activestorage (= 7.2.4)
42
+ activesupport (= 7.2.4)
43
43
  mail (>= 2.8.0)
44
- actionmailer (7.2.3.2)
45
- actionpack (= 7.2.3.2)
46
- actionview (= 7.2.3.2)
47
- activejob (= 7.2.3.2)
48
- activesupport (= 7.2.3.2)
44
+ actionmailer (7.2.4)
45
+ actionpack (= 7.2.4)
46
+ actionview (= 7.2.4)
47
+ activejob (= 7.2.4)
48
+ activesupport (= 7.2.4)
49
49
  mail (>= 2.8.0)
50
50
  rails-dom-testing (~> 2.2)
51
- actionpack (7.2.3.2)
52
- actionview (= 7.2.3.2)
53
- activesupport (= 7.2.3.2)
51
+ actionpack (7.2.4)
52
+ actionview (= 7.2.4)
53
+ activesupport (= 7.2.4)
54
54
  cgi
55
55
  nokogiri (>= 1.8.5)
56
56
  racc
@@ -60,41 +60,41 @@ GEM
60
60
  rails-dom-testing (~> 2.2)
61
61
  rails-html-sanitizer (~> 1.6)
62
62
  useragent (~> 0.16)
63
- actiontext (7.2.3.2)
64
- actionpack (= 7.2.3.2)
65
- activerecord (= 7.2.3.2)
66
- activestorage (= 7.2.3.2)
67
- activesupport (= 7.2.3.2)
63
+ actiontext (7.2.4)
64
+ actionpack (= 7.2.4)
65
+ activerecord (= 7.2.4)
66
+ activestorage (= 7.2.4)
67
+ activesupport (= 7.2.4)
68
68
  globalid (>= 0.6.0)
69
69
  nokogiri (>= 1.8.5)
70
- actionview (7.2.3.2)
71
- activesupport (= 7.2.3.2)
70
+ actionview (7.2.4)
71
+ activesupport (= 7.2.4)
72
72
  builder (~> 3.1)
73
73
  cgi
74
74
  erubi (~> 1.11)
75
75
  rails-dom-testing (~> 2.2)
76
76
  rails-html-sanitizer (~> 1.6)
77
- activejob (7.2.3.2)
78
- activesupport (= 7.2.3.2)
77
+ activejob (7.2.4)
78
+ activesupport (= 7.2.4)
79
79
  globalid (>= 0.3.6)
80
- activemodel (7.2.3.2)
81
- activesupport (= 7.2.3.2)
82
- activerecord (7.2.3.2)
83
- activemodel (= 7.2.3.2)
84
- activesupport (= 7.2.3.2)
80
+ activemodel (7.2.4)
81
+ activesupport (= 7.2.4)
82
+ activerecord (7.2.4)
83
+ activemodel (= 7.2.4)
84
+ activesupport (= 7.2.4)
85
85
  timeout (>= 0.4.0)
86
- activestorage (7.2.3.2)
87
- actionpack (= 7.2.3.2)
88
- activejob (= 7.2.3.2)
89
- activerecord (= 7.2.3.2)
90
- activesupport (= 7.2.3.2)
86
+ activestorage (7.2.4)
87
+ actionpack (= 7.2.4)
88
+ activejob (= 7.2.4)
89
+ activerecord (= 7.2.4)
90
+ activesupport (= 7.2.4)
91
91
  marcel (~> 1.0)
92
- activesupport (7.2.3.2)
92
+ activesupport (7.2.4)
93
93
  base64
94
94
  benchmark (>= 0.3)
95
95
  bigdecimal
96
96
  concurrent-ruby (~> 1.0, >= 1.3.1)
97
- connection_pool (>= 2.2.5)
97
+ connection_pool (>= 2.2.5, < 3)
98
98
  drb
99
99
  i18n (>= 1.6, < 2)
100
100
  logger (>= 1.4.2)
@@ -108,11 +108,11 @@ GEM
108
108
  cgi (0.5.2-java)
109
109
  concurrent-ruby (1.3.8)
110
110
  connection_pool (2.5.5)
111
- crass (1.0.7)
111
+ crass (1.0.8)
112
112
  cronex (0.15.0)
113
113
  tzinfo
114
114
  unicode (>= 0.4.4.5)
115
- date (3.5.1-java)
115
+ date (3.6.0-java)
116
116
  diff-lcs (1.6.2)
117
117
  docile (1.4.1)
118
118
  drb (2.2.3)
@@ -128,13 +128,13 @@ GEM
128
128
  activesupport (>= 6.1)
129
129
  i18n (1.15.2)
130
130
  concurrent-ruby (~> 1.0)
131
- io-console (0.9.4-java)
132
- irb (1.18.0)
131
+ io-console (0.9.5-java)
132
+ irb (1.19.0)
133
133
  pp (>= 0.6.0)
134
134
  prism (>= 1.3.0)
135
135
  rdoc (>= 4.0.0)
136
136
  reline (>= 0.4.2)
137
- jar-dependencies (0.6.1-java)
137
+ jar-dependencies (0.6.2-java)
138
138
  logger (1.7.0)
139
139
  loofah (2.25.2)
140
140
  crass (~> 1.0.2)
@@ -155,42 +155,42 @@ GEM
155
155
  net-protocol
156
156
  net-protocol (0.4.0)
157
157
  timeout
158
- net-smtp (0.5.1)
158
+ net-smtp (0.5.2)
159
159
  net-protocol
160
160
  nio4r (2.7.5-java)
161
161
  nokogiri (1.18.10-java)
162
162
  racc (~> 1.4)
163
163
  pp (0.6.4)
164
164
  prettyprint
165
- prettyprint (0.2.0)
166
- prism (1.9.0)
165
+ prettyprint (0.2.1)
166
+ prism (2.1.0)
167
167
  psych (5.5.0-java)
168
168
  date
169
169
  jar-dependencies (>= 0.1.7)
170
170
  raabro (1.5.0)
171
171
  racc (1.8.1-java)
172
- rack (3.2.7)
172
+ rack (3.2.8)
173
173
  rack-session (2.1.2)
174
174
  base64 (>= 0.1.0)
175
175
  rack (>= 3.0.0)
176
- rack-test (2.2.0)
176
+ rack-test (2.3.0)
177
177
  rack (>= 1.3)
178
178
  rackup (2.3.1)
179
179
  rack (>= 3)
180
- rails (7.2.3.2)
181
- actioncable (= 7.2.3.2)
182
- actionmailbox (= 7.2.3.2)
183
- actionmailer (= 7.2.3.2)
184
- actionpack (= 7.2.3.2)
185
- actiontext (= 7.2.3.2)
186
- actionview (= 7.2.3.2)
187
- activejob (= 7.2.3.2)
188
- activemodel (= 7.2.3.2)
189
- activerecord (= 7.2.3.2)
190
- activestorage (= 7.2.3.2)
191
- activesupport (= 7.2.3.2)
180
+ rails (7.2.4)
181
+ actioncable (= 7.2.4)
182
+ actionmailbox (= 7.2.4)
183
+ actionmailer (= 7.2.4)
184
+ actionpack (= 7.2.4)
185
+ actiontext (= 7.2.4)
186
+ actionview (= 7.2.4)
187
+ activejob (= 7.2.4)
188
+ activemodel (= 7.2.4)
189
+ activerecord (= 7.2.4)
190
+ activestorage (= 7.2.4)
191
+ activesupport (= 7.2.4)
192
192
  bundler (>= 1.15.0)
193
- railties (= 7.2.3.2)
193
+ railties (= 7.2.4)
194
194
  rails-dom-testing (2.3.0)
195
195
  activesupport (>= 5.0.0)
196
196
  minitest
@@ -198,9 +198,9 @@ GEM
198
198
  rails-html-sanitizer (1.7.1)
199
199
  loofah (~> 2.25, >= 2.25.2)
200
200
  nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
201
- railties (7.2.3.2)
202
- actionpack (= 7.2.3.2)
203
- activesupport (= 7.2.3.2)
201
+ railties (7.2.4)
202
+ actionpack (= 7.2.4)
203
+ activesupport (= 7.2.4)
204
204
  cgi
205
205
  irb (~> 1.13)
206
206
  rackup (>= 1.0.0)
@@ -213,7 +213,7 @@ GEM
213
213
  erb
214
214
  psych (>= 4.0.0)
215
215
  tsort
216
- redis-client (0.30.1)
216
+ redis-client (0.31.0)
217
217
  connection_pool
218
218
  reline (0.7.0)
219
219
  io-console (~> 0.5)
@@ -222,17 +222,17 @@ GEM
222
222
  rspec-core (~> 3.13.0)
223
223
  rspec-expectations (~> 3.13.0)
224
224
  rspec-mocks (~> 3.13.0)
225
- rspec-core (3.13.6)
225
+ rspec-core (3.13.7)
226
226
  rspec-support (~> 3.13.0)
227
- rspec-expectations (3.13.5)
227
+ rspec-expectations (3.13.6)
228
228
  diff-lcs (>= 1.2.0, < 2.0)
229
229
  rspec-support (~> 3.13.0)
230
- rspec-mocks (3.13.8)
230
+ rspec-mocks (3.13.9)
231
231
  diff-lcs (>= 1.2.0, < 2.0)
232
232
  rspec-support (~> 3.13.0)
233
233
  rspec-retry (0.6.2)
234
234
  rspec-core (> 3.3)
235
- rspec-support (3.13.7)
235
+ rspec-support (3.13.8)
236
236
  rufus-scheduler (3.9.2)
237
237
  fugit (~> 1.1, >= 1.11.1)
238
238
  securerandom (0.4.1)
@@ -299,17 +299,17 @@ DEPENDENCIES
299
299
  timecop
300
300
 
301
301
  CHECKSUMS
302
- actioncable (7.2.3.2) sha256=04ffd91519942bae45f443bfc166308e6eb17870870cdfc1ca36bc95273c6b57
303
- actionmailbox (7.2.3.2) sha256=d19f6e98c5b630c391e14ce1a830f199f249bf3fd6208392f92d232a7a6d8ca5
304
- actionmailer (7.2.3.2) sha256=45a6c326872867cdb28d2960d236c3c8fa4ff1198e9bc7ece4ddc3810b67b759
305
- actionpack (7.2.3.2) sha256=c1fbb1c4df0f2473ee064ab1412fc2a44c2c2ef337924c5ba3c7998c8529652b
306
- actiontext (7.2.3.2) sha256=19ab7e2a07ab976a5456a9aa98b93e1b899a7729b931ca1e9e01a3e8bd33f0b0
307
- actionview (7.2.3.2) sha256=42bfd966040c93271dfa9f3243d73c40aa0228108696f956e1f287f3b02edc01
308
- activejob (7.2.3.2) sha256=b83fa070898911823f0c4cb8c0d1d25dabb5d00f18379d5b4fe01b84e173a93a
309
- activemodel (7.2.3.2) sha256=3777c67cd8dd1560f30387523013dacb370a0a1cf532037410887819e4416927
310
- activerecord (7.2.3.2) sha256=e62d24ba7e5f820d24ed122eb9225491b0aaa8398778783b400067c3467285c7
311
- activestorage (7.2.3.2) sha256=863cb4b21b83505555be2addb939fefb856ab05f6c6d24bab00d6f1a7e4edbfc
312
- activesupport (7.2.3.2) sha256=ddc90d11dd88086d78ace03407fe3c2a3f5c8853c3c3046313db5ed823ef3312
302
+ actioncable (7.2.4) sha256=053e939f728eac986ff5321e42ba5b884de6ab64a392af0e8d45866d0d3fb63a
303
+ actionmailbox (7.2.4) sha256=92d4d107554eb29cdffce9aaaf41daf07b9e6579d5a0d4cc9b64de6e87eadee9
304
+ actionmailer (7.2.4) sha256=9c58352e79df660aecddb1cdfbe1e6e555169c3328ae15ec06b6eae611de8917
305
+ actionpack (7.2.4) sha256=c7acf80263cf09125e5c4d866abda3536cc941f436e81673f17be11ad407a4eb
306
+ actiontext (7.2.4) sha256=49b0a18a387e983d48fa559ef8aa8d9c37c21399998b59984d87c387d81f3c9c
307
+ actionview (7.2.4) sha256=6005a3427881b2e8f509a5f7ed894e66f256410f734f7a227d01c4d3d9cb06a2
308
+ activejob (7.2.4) sha256=a83376234173c67e2d7b155132b79750776215ab16f1a0a2f20ad59a50a7054b
309
+ activemodel (7.2.4) sha256=c6a2f2290fdf8728b596fba1fc528e65852c6e015ccc385ddf0f93c455588773
310
+ activerecord (7.2.4) sha256=b3549deb6a4c469e0cb652194cf566b6010f1f1796404b4213d8b47469d411e5
311
+ activestorage (7.2.4) sha256=cc82c0d1c50cfcd52197067a61ca16e5b3716c0ac2eba666b30449ba3532bddc
312
+ activesupport (7.2.4) sha256=b97027b31e111675dba67b86edcd589acc25a0dddf8eecacca18d33a703a0788
313
313
  base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b
314
314
  benchmark (0.5.0) sha256=465df122341aedcb81a2a24b4d3bd19b6c67c1530713fd533f3ff034e419236c
315
315
  bigdecimal (4.1.3-java) sha256=9a6a1fa67723a27ab1b3a6d5526322d8c82170af03199da7c915b8d9a1770532
@@ -317,9 +317,9 @@ CHECKSUMS
317
317
  cgi (0.5.2-java) sha256=08bbfe06e10e771d36f10db6c1dfb81727ea2a25c3dbcd28d890a1794414a73d
318
318
  concurrent-ruby (1.3.8) sha256=b2f1be836e968ccc78ccfce277ea79c72a88633f22306782c16ff23fb415d1e1
319
319
  connection_pool (2.5.5) sha256=e54ff92855753df1fd7c59fa04a398833355f27dd14c074f8c83a05f72a716ad
320
- crass (1.0.7) sha256=94868719948664c89ddcaf0a37c65048413dfcb1c869470a5f7a7ceb5390b295
320
+ crass (1.0.8) sha256=7a0145c7a2c59f8e7923b3a69ce819c444823a00a5127d805298fea13be24efe
321
321
  cronex (0.15.0) sha256=21c794e085fad2951c4f2e279f440340a35ba2297e0b738f22f263f69fbe2186
322
- date (3.5.1-java) sha256=12e09477dc932afe45bf768cd362bf73026804e0db1e6c314186d6cd0bee3344
322
+ date (3.6.0-java) sha256=7276986bbacc2357d0c6d41a863be5906e2f745ea2ccb47eed84bf761f6a7806
323
323
  diff-lcs (1.6.2) sha256=9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962
324
324
  docile (1.4.1) sha256=96159be799bfa73cdb721b840e9802126e4e03dfc26863db73647204c727f21e
325
325
  drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373
@@ -329,9 +329,9 @@ CHECKSUMS
329
329
  fugit (1.14.0) sha256=e311a9cc85a54bb67649df45060e721282a1e2c8ebad40e41874a3a7d576f37e
330
330
  globalid (1.4.0) sha256=037f12fbf1d9d7a014d501c2d5c77356fd4ddd96d7a7991d6700bba96706f427
331
331
  i18n (1.15.2) sha256=00f9eb62412fe593b2a65a97daa75300d37abb8f7202ec748e94b6d46a9dd1b5
332
- io-console (0.9.4-java) sha256=789188c38b937fc2d04400e35fd3b2838ffdf061e846571e51524036bc1bc185
333
- irb (1.18.0) sha256=de9454a0703a54704b9811a5ef31a60c86949fbf4013fcf244fabc7c775248e3
334
- jar-dependencies (0.6.1-java) sha256=2746643482d139fd9cecb524b57df63b71d9b5d734c7275171701201e3164f23
332
+ io-console (0.9.5-java) sha256=34b74ec7d8e39a526fb9a82aa34853257a1baa08f56c5cd5d37ec6be2a5e6000
333
+ irb (1.19.0) sha256=55ee56acbdd6c9fe06a2e6909f46a24e5c41f45f16906bab04e8049cf46f1d27
334
+ jar-dependencies (0.6.2-java) sha256=3196d7c5b63a221e0593c260c449e3a36dbbde733ec34260109ebd50546cb8e5
335
335
  logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
336
336
  loofah (2.25.2) sha256=2007f746959ac65552456e04b433e83deb22759ab38c838b4445c70e43425918
337
337
  mail (2.9.1) sha256=06574eca475253d6c18145dd70af80d0eb970182d55053497c5f4d797ea160e8
@@ -341,39 +341,39 @@ CHECKSUMS
341
341
  net-imap (0.5.15) sha256=f64dc7f0b456d6a1b62007ead055994034f039f4aa6ff614e35f0b93395c0614
342
342
  net-pop (0.1.2) sha256=848b4e982013c15b2f0382792268763b748cce91c9e91e36b0f27ed26420dff3
343
343
  net-protocol (0.4.0) sha256=f9f90c8c6f64794a45160bf422177a336db12809de3beeeaa26b88fcd2e8c853
344
- net-smtp (0.5.1) sha256=ed96a0af63c524fceb4b29b0d352195c30d82dd916a42f03c62a3a70e5b70736
344
+ net-smtp (0.5.2) sha256=35103cc04d6b2d94632f9928ede07483c24b70b9c0db1f231fea43909b678f3c
345
345
  nio4r (2.7.5-java) sha256=d14779d2a9b012ec0148a53344fbb2ed2a3c4d90c5dd923bf281135ab983b2c9
346
346
  nokogiri (1.18.10-java) sha256=cd431a09c45d84a2f870ba0b7e8f571199b3727d530f2b4888a73639f76510b5
347
347
  pp (0.6.4) sha256=dfcb0fce700c41456265922884f9fe195d7fbb0674a3578e6c0f69588e82b570
348
- prettyprint (0.2.0) sha256=2bc9e15581a94742064a3cc8b0fb9d45aae3d03a1baa6ef80922627a0766f193
349
- prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85
348
+ prettyprint (0.2.1) sha256=d555d57ea6d7cf001d4774b693546a6bd88bec1e778ddffb5c60b68ceec4b7d4
349
+ prism (2.1.0) sha256=1c0a7c6dea0e93183390fb123f007564dbe663198e2f86ad87204151147601f3
350
350
  psych (5.5.0-java) sha256=3b7cf3684c44d049c3dee87ec4118ec9cd6ac714cbdcfba386997f96dbbd36ab
351
351
  raabro (1.5.0) sha256=3f998a7bc84f9c84df3ab580634d2e0a5bda4f0841168d56035f529c9877440a
352
352
  racc (1.8.1-java) sha256=54f2e6d1e1b91c154013277d986f52a90e5ececbe91465d29172e49342732b98
353
- rack (3.2.7) sha256=93e13e1c24f93556671d85d2d79fa228c3485815c50d7e2f265b5330c6528fb7
353
+ rack (3.2.8) sha256=1fecc85e463ebc7a2a945fff829ffcd549babeb1556384796fad946c28dc4ec7
354
354
  rack-session (2.1.2) sha256=595434f8c0c3473ae7d7ac56ecda6cc6dfd9d37c0b2b5255330aa1576967ffe8
355
- rack-test (2.2.0) sha256=005a36692c306ac0b4a9350355ee080fd09ddef1148a5f8b2ac636c720f5c463
355
+ rack-test (2.3.0) sha256=b118d177cc002c572fc1b6fd8d19c9ed5881a36e8d6f689f9e618f9f861241e8
356
356
  rackup (2.3.1) sha256=6c79c26753778e90983761d677a48937ee3192b3ffef6bc963c0950f94688868
357
- rails (7.2.3.2) sha256=279290679f9005b0f79514f953a2af613f95de7baa94cbd87744c09122c1113c
357
+ rails (7.2.4) sha256=28b530f2db9dc112ce896fd93a00863d7e9ee98c4e7dbd02ea5b7647cb63738e
358
358
  rails-dom-testing (2.3.0) sha256=8acc7953a7b911ca44588bf08737bc16719f431a1cc3091a292bca7317925c1d
359
359
  rails-html-sanitizer (1.7.1) sha256=e797a7c9b01e567307e317c576b49ab4168017e63eea4dba9ce3cb587e2f22c2
360
- railties (7.2.3.2) sha256=f626c6dfcc00a9f85b139619cfac4a648934c93e36fe5b9242184b9f45ffc29e
360
+ railties (7.2.4) sha256=e4b754edc7b42c9f3d6cc3048832efe634d727aa59093a03bf8a78096917f121
361
361
  rake (12.3.3) sha256=f7694adb4fe638da35452300cee6c545e9c377a0e3190018ac04d590b3c26ab3
362
362
  rdoc (7.2.0) sha256=8650f76cd4009c3b54955eb5d7e3a075c60a57276766ebf36f9085e8c9f23192
363
- redis-client (0.30.1) sha256=5151bc5c7bbfe48623732cdae3b900d8a22dc691cc7cdfacfb351ac55116522d
363
+ redis-client (0.31.0) sha256=6820cb2a21e6795a823141f50fd25e655de2b8dc8ff833b43509a27b0263fd75
364
364
  reline (0.7.0) sha256=5b012d8e55dbf9d450f12bde2cf7d15ff546ae80b3f8f3b30e570d431815583d
365
365
  rexml (3.4.1) sha256=c74527a9a0a04b4ec31dbe0dc4ed6004b960af943d8db42e539edde3a871abca
366
366
  rspec (3.13.2) sha256=206284a08ad798e61f86d7ca3e376718d52c0bc944626b2349266f239f820587
367
- rspec-core (3.13.6) sha256=a8823c6411667b60a8bca135364351dda34cd55e44ff94c4be4633b37d828b2d
368
- rspec-expectations (3.13.5) sha256=33a4d3a1d95060aea4c94e9f237030a8f9eae5615e9bd85718fe3a09e4b58836
369
- rspec-mocks (3.13.8) sha256=086ad3d3d17533f4237643de0b5c42f04b66348c28bf6b9c2d3f4a3b01af1d47
367
+ rspec-core (3.13.7) sha256=c64ff16d9788119805cbc6a3f4b6d87cc22417c2d25976a3330de136896b5469
368
+ rspec-expectations (3.13.6) sha256=bf538ca6d367ff5b0d85a87fdb5c0c6038f2cd1308a0eeba07476caa02d22f35
369
+ rspec-mocks (3.13.9) sha256=ea5c7ff3054a6098ca6039aacef80aec69d5a8a3ef80be8fc88337359b672a30
370
370
  rspec-retry (0.6.2) sha256=6101ba23a38809811ae3484acde4ab481c54d846ac66d5037ccb40131a60d858
371
- rspec-support (3.13.7) sha256=0640e5570872aafefd79867901deeeeb40b0c9875a36b983d85f54fb7381c47c
371
+ rspec-support (3.13.8) sha256=e4160030309b7e3e9d9863dfe720a35dfcc577162f5402cd68fc8c5258a0ffd6
372
372
  rufus-scheduler (3.9.2) sha256=55fa9e4db0ff69d7f38c804f17baba0c9bce5cba39984ae3c5cf6c039d1323b9
373
373
  securerandom (0.4.1) sha256=cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1
374
- sentry-rails (7.0.0)
375
- sentry-ruby (7.0.0)
376
- sentry-sidekiq (7.0.0)
374
+ sentry-rails (7.2.0)
375
+ sentry-ruby (7.2.0)
376
+ sentry-sidekiq (7.2.0)
377
377
  sidekiq (7.3.10) sha256=781eb4f65ef36042534ad73d72f211283afb7fee82eec786ada4ed1972ef8e3c
378
378
  sidekiq-cron (2.4.0) sha256=25595c5aee0c16d13a89466e5108af047fa4cfbf388199b39e1a600ca39472d4
379
379
  sidekiq-scheduler (5.0.6) sha256=aa49fa982fb0d58e3e94d6bc2e2187be000414b9354a9f35e0cd06de204ad5be
@@ -0,0 +1,44 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "sentry/rails/active_job_extension"
4
+
5
+ module Sentry
6
+ module Sidekiq
7
+ # The extension sentry-rails uses for ActiveJob jobs on Sidekiq when the app
8
+ # lets sentry-rails report them. It keeps Sidekiq's transaction names, origin
9
+ # and integration, so these jobs look the same in Sentry in either mode.
10
+ #
11
+ # @see ActiveJobSupport
12
+ class ActiveJobExtension < Sentry::Rails::ActiveJobExtension
13
+ def initialize(name: :sidekiq_active_job, integration: Sentry::Sidekiq, origin: JobExtension::SPAN_ORIGIN, **dependencies)
14
+ super(name: name, integration: integration, origin: origin, **dependencies)
15
+ end
16
+
17
+ # Leaves the `queue.publish` span to {SentryContextClientMiddleware}.
18
+ #
19
+ # @see Sentry::JobExtensions::Extension#record_publish_span?
20
+ def record_publish_span?(job:, **)
21
+ false
22
+ end
23
+
24
+ # Identifies the message by its Sidekiq jid, as the `queue.publish` span
25
+ # recorded by {SentryContextClientMiddleware} does.
26
+ #
27
+ # @see Sentry::JobExtensions::Extension#messaging_data
28
+ def messaging_data(job:, **context)
29
+ data = super
30
+ data[:message_id] = job.provider_job_id if job.provider_job_id
31
+ data
32
+ end
33
+
34
+ # Names the transaction `Sidekiq/<ActiveJob class>`.
35
+ #
36
+ # @see Sentry::JobExtensions::Extension#transaction_name
37
+ def transaction_name(job:, **)
38
+ "#{JobExtension::SIDEKIQ_NAME}/#{super}"
39
+ end
40
+ end
41
+
42
+ Sentry::Rails.register_active_job_extension(:sidekiq, ActiveJobExtension.new)
43
+ end
44
+ end
@@ -0,0 +1,75 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "sentry/sidekiq/job_extension"
4
+
5
+ module Sentry
6
+ module Sidekiq
7
+ # Support for ActiveJob jobs run through Sidekiq, which reports them in one of
8
+ # two modes:
9
+ #
10
+ # - By default, sentry-rails skips the Sidekiq adapter and sentry-sidekiq
11
+ # reports ActiveJob jobs like other Sidekiq jobs, through
12
+ # {ActiveJobSupport::JobExtension}.
13
+ # - When the app removes the Sidekiq adapter from
14
+ # `config.rails.skippable_job_adapters`, sentry-rails reports them through
15
+ # {Sentry::Sidekiq::ActiveJobExtension}, and {ActiveJobSupport::ServerMiddleware}
16
+ # keeps sentry-sidekiq from reporting them a second time.
17
+ module ActiveJobSupport
18
+ RESERVED_KEY_PREFIX = /^_aj_/
19
+
20
+ # Returns whether the Sidekiq job wraps an ActiveJob job.
21
+ #
22
+ # @param job [Hash]
23
+ # @return [Boolean]
24
+ def self.handles?(job)
25
+ job.is_a?(Hash) && job.key?("wrapped")
26
+ end
27
+
28
+ # The extension sentry-sidekiq uses for ActiveJob jobs it reports itself. It
29
+ # names jobs after the ActiveJob class and keeps ActiveJob's serialization
30
+ # details out of error events.
31
+ class JobExtension < Sentry::Sidekiq::JobExtension
32
+ # Names the transaction `Sidekiq/<ActiveJob class>`.
33
+ #
34
+ # @see Sentry::JobExtensions::Extension#transaction_name
35
+ def transaction_name(job:, **)
36
+ "#{SIDEKIQ_NAME}/#{job["wrapped"]}"
37
+ end
38
+
39
+ # Also replaces ActiveJob's serialized values with readable ones.
40
+ #
41
+ # @see Sentry::Sidekiq::JobExtension#error_context
42
+ def error_context(context)
43
+ strip_reserved_keys(super)
44
+ end
45
+
46
+ private
47
+
48
+ def without_arguments(context)
49
+ return context if Sentry.configuration.data_collection.queues
50
+
51
+ super.merge(context.slice("args").transform_values { |args| without_active_job_arguments(args) })
52
+ end
53
+
54
+ def without_active_job_arguments(args)
55
+ Array(args).grep(Hash).map { |payload| payload.reject { |key, _value| key.to_s == "arguments" } }
56
+ end
57
+
58
+ def strip_reserved_keys(value)
59
+ case value
60
+ when Array
61
+ value.map { |item| strip_reserved_keys(item) }
62
+ when Hash
63
+ value.to_h { |key, item| [reserved_key?(key) ? key.to_s.sub(RESERVED_KEY_PREFIX, "") : key, strip_reserved_keys(item)] }
64
+ else
65
+ defined?(::GlobalID) && value.is_a?(::GlobalID) ? value.to_s : value
66
+ end
67
+ end
68
+
69
+ def reserved_key?(key)
70
+ key.to_s.match?(RESERVED_KEY_PREFIX)
71
+ end
72
+ end
73
+ end
74
+ end
75
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentry
4
+ module Sidekiq
5
+ module ActiveJobSupport
6
+ ACTIVE_JOB_ADAPTER = "ActiveJob::QueueAdapters::SidekiqAdapter"
7
+
8
+ # Prepended to {SentryContextServerMiddleware} when sentry-rails reports
9
+ # ActiveJob jobs on Sidekiq. For those jobs it only isolates the hub and
10
+ # continues the job's trace, leaving the reporting to sentry-rails.
11
+ module ServerMiddleware
12
+ def call(worker, job, queue)
13
+ return super unless ActiveJobSupport.handles?(job)
14
+
15
+ if Sentry.initialized?
16
+ Sentry.clone_hub_to_current_thread
17
+ Sentry.continue_trace(job["trace_propagation_headers"] || {})
18
+ end
19
+
20
+ yield
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -3,24 +3,16 @@
3
3
  module Sentry
4
4
  module Sidekiq
5
5
  class ContextFilter
6
- ACTIVEJOB_RESERVED_PREFIX_REGEX = /^_aj_/
7
6
  SIDEKIQ_NAME = "Sidekiq"
8
7
 
9
8
  attr_reader :context
10
9
 
11
10
  def initialize(context)
12
11
  @context = context
13
- @has_global_id = defined?(GlobalID)
14
12
  end
15
13
 
16
- # Once an ActiveJob is queued, ActiveRecord references get serialized into
17
- # some internal reserved keys, such as _aj_globalid.
18
- #
19
- # The problem is, if this job in turn gets queued back into ActiveJob with
20
- # these magic reserved keys, ActiveJob will throw up and error. We want to
21
- # capture these and mutate the keys so we can sanely report it.
22
14
  def filtered
23
- filtered_context = filter_context(context)
15
+ filtered_context = context.dup
24
16
 
25
17
  if job_entry = filtered_context.delete(:job)
26
18
  job_entry.each do |k, v|
@@ -35,43 +27,10 @@ module Sentry
35
27
  end
36
28
 
37
29
  def transaction_name
38
- class_name = (context["wrapped"] || context["class"] ||
39
- (context[:job] && (context[:job]["wrapped"] || context[:job]["class"]))
40
- )
30
+ job = context["class"] ? context : context[:job]
31
+ return Sentry::Sidekiq.job_extension_for(job).transaction_name(job: job) if job.is_a?(Hash) && job["class"]
41
32
 
42
- if class_name
43
- "#{SIDEKIQ_NAME}/#{class_name}"
44
- elsif context[:event]
45
- "#{SIDEKIQ_NAME}/#{context[:event]}"
46
- else
47
- SIDEKIQ_NAME
48
- end
49
- end
50
-
51
- private
52
-
53
- def filter_context(hash)
54
- case hash
55
- when Array
56
- hash.map { |arg| filter_context(arg) }
57
- when Hash
58
- Hash[hash.map { |key, value| filter_context_hash(key, value) }]
59
- else
60
- if has_global_id? && hash.is_a?(GlobalID)
61
- hash.to_s
62
- else
63
- hash
64
- end
65
- end
66
- end
67
-
68
- def filter_context_hash(key, value)
69
- key = key.to_s.sub(ACTIVEJOB_RESERVED_PREFIX_REGEX, "") if key.match(ACTIVEJOB_RESERVED_PREFIX_REGEX)
70
- [key, filter_context(value)]
71
- end
72
-
73
- def has_global_id?
74
- @has_global_id
33
+ context[:event] ? "#{SIDEKIQ_NAME}/#{context[:event]}" : SIDEKIQ_NAME
75
34
  end
76
35
  end
77
36
  end