sentry-resque 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: edb60b08547acd1d4a9c6353607d1042549959d6c0c23db54ced0031b4e71f78
4
- data.tar.gz: 55ce87cbc0e2ebea0a6e69c1022839f775e2769819eaadddef376a31e5a6b9d0
3
+ metadata.gz: 4354c73183cbe550dc2e2de013e8aea16d96936462db3095e4cde42e478739d7
4
+ data.tar.gz: 0f29758c0b6f5229aaaf9e58e75589ffd8ffbeb799138d4632a4a1765be5440c
5
5
  SHA512:
6
- metadata.gz: fd30f1d76a0a1bd8ca6ed9717cdcd8436a1cc1c1e6c19ee7142c4837b2fe005165ff380e3742a6ad4c0368c4b36a5cc6962bd5d66b659d47ed40c991ce68c1a9
7
- data.tar.gz: 48c6b31aced2ecafe5cca292f1a578a89871588f1b83ff394b97207079a72e87fc8a519308d994ff7c3f55f0eda96ab784a88655aefbde6207bdff15cd43e11a
6
+ metadata.gz: d8d9db914adefac41fe4909f0b78dec582d4a48dd9db9b9f785538f159da8b38b40b2e2770dd26c96dbb28826e9ba8b73f6d9a869bd27b9c21c980eaf8f01430
7
+ data.tar.gz: 5dffce7fa0b0b5e4e328fb0468ac0eec42ab3c63906e8b66fd2919ce17223dcaf29a2781f69d936b3cab787510ea338210ed55e22a22e544168f531f18bc5784
data/Gemfile CHANGED
@@ -14,3 +14,12 @@ gem "resque-retry", "~> 1.8"
14
14
 
15
15
  gem "sentry-rails", path: "../sentry-rails"
16
16
  gem "rails", "> 5.2.0"
17
+
18
+ unless RUBY_PLATFORM.include?("java")
19
+ if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.2")
20
+ gem "resque-scheduler", "~> 5.0"
21
+ gem "mock_redis"
22
+ gem "sqlite3"
23
+ gem "rspec-rails"
24
+ end
25
+ end
data/README.md CHANGED
@@ -1,6 +1,10 @@
1
1
  <p align="center">
2
2
  <a href="https://sentry.io" target="_blank" align="center">
3
- <img src="https://sentry-brand.storage.googleapis.com/sentry-logo-black.png" width="280">
3
+ <picture>
4
+ <source srcset="https://sentry-brand.storage.googleapis.com/sentry-logo-white.png" media="(prefers-color-scheme: dark)" />
5
+ <source srcset="https://sentry-brand.storage.googleapis.com/sentry-wordmark-dark-280x84.png" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" />
6
+ <img src="https://sentry-brand.storage.googleapis.com/sentry-wordmark-dark-280x84.png" alt="Sentry" width="280">
7
+ </picture>
4
8
  </a>
5
9
  <br>
6
10
  </p>
@@ -31,4 +35,22 @@ gem "sentry-ruby"
31
35
  gem "sentry-resque"
32
36
  ```
33
37
 
34
- Then you're all set! `sentry-resque` will automatically insert a custom middleware and error handler to capture exceptions from your workers!
38
+ Then you're all set! `sentry-resque` captures exceptions and starts a `queue.resque` transaction for every job your Resque workers perform.
39
+
40
+ ## Maintenance Mode
41
+
42
+ `sentry-resque` is in maintenance mode. The integration for plain Resque jobs keeps receiving fixes, but new background job features land in `sentry-rails` through its ActiveJob integration.
43
+
44
+ ### ActiveJob on Resque
45
+
46
+ By default, `ActiveJob::QueueAdapters::ResqueAdapter` is listed in `config.rails.skippable_job_adapters`, so ActiveJob jobs running on Resque are reported by `sentry-resque`. Rails apps can opt in to the `sentry-rails` ActiveJob integration instead by removing the adapter from that list:
47
+
48
+ ```ruby
49
+ # config/initializers/sentry.rb
50
+ Sentry.init do |config|
51
+ # ...
52
+ config.rails.skippable_job_adapters.delete("ActiveJob::QueueAdapters::ResqueAdapter")
53
+ end
54
+ ```
55
+
56
+ Once opted in, `sentry-rails` reports those jobs with Resque data: the `resque.queue` tag, the `Active-Job` context, and the `messaging.*` span data for the Resque queue. `sentry-resque` only reports errors raised before an ActiveJob job starts, such as a job class that can no longer be loaded. Plain Resque jobs are not affected.
data/Rakefile CHANGED
@@ -3,8 +3,24 @@
3
3
  require "bundler/gem_tasks"
4
4
  require "rspec/core/rake_task"
5
5
 
6
- RSpec::Core::RakeTask.new(:spec).tap do |task|
6
+ RSpec::Core::RakeTask.new(:spec) do |task|
7
+ task.pattern = "spec/sentry/**/*_spec.rb"
7
8
  task.rspec_opts = "--order rand"
8
9
  end
9
10
 
10
- task default: :spec
11
+ namespace :spec do
12
+ isolated_tasks = Dir["spec/isolated/**/*_spec.rb"].sort.map do |file|
13
+ task_name = "isolated:#{file.delete_prefix("spec/isolated/").delete_suffix("_spec.rb")}"
14
+
15
+ RSpec::Core::RakeTask.new(task_name) do |task|
16
+ task.pattern = file
17
+ task.rspec_opts = "--format progress"
18
+ end
19
+
20
+ task_name
21
+ end
22
+
23
+ task isolated: isolated_tasks
24
+ end
25
+
26
+ task default: [:spec, :"spec:isolated"]
@@ -9,14 +9,14 @@ GIT
9
9
  PATH
10
10
  remote: ../../sentry-rails
11
11
  specs:
12
- sentry-rails (7.0.0)
12
+ sentry-rails (7.2.0)
13
13
  railties (>= 5.2.0)
14
- sentry-ruby (~> 7.0.0)
14
+ sentry-ruby (~> 7.2.0)
15
15
 
16
16
  PATH
17
17
  remote: ../../sentry-ruby
18
18
  specs:
19
- sentry-ruby (7.0.0)
19
+ sentry-ruby (7.2.0)
20
20
  bigdecimal
21
21
  concurrent-ruby (~> 1.0, >= 1.0.2)
22
22
  logger
@@ -24,9 +24,9 @@ PATH
24
24
  PATH
25
25
  remote: ..
26
26
  specs:
27
- sentry-resque (7.0.0)
27
+ sentry-resque (7.2.0)
28
28
  resque (>= 1.24)
29
- sentry-ruby (~> 7.0.0)
29
+ sentry-ruby (~> 7.2.0)
30
30
 
31
31
  GEM
32
32
  remote: https://rubygems.org/
@@ -117,8 +117,8 @@ GEM
117
117
  cgi (0.5.2)
118
118
  concurrent-ruby (1.3.8)
119
119
  connection_pool (2.5.5)
120
- crass (1.0.7)
121
- date (3.5.1)
120
+ crass (1.0.8)
121
+ date (3.6.0)
122
122
  diff-lcs (1.6.2)
123
123
  docile (1.4.1)
124
124
  drb (2.2.3)
@@ -134,8 +134,8 @@ GEM
134
134
  activesupport (>= 6.1)
135
135
  i18n (1.14.8)
136
136
  concurrent-ruby (~> 1.0)
137
- io-console (0.9.4)
138
- irb (1.18.0)
137
+ io-console (0.9.5)
138
+ irb (1.19.0)
139
139
  pp (>= 0.6.0)
140
140
  prism (>= 1.3.0)
141
141
  rdoc (>= 4.0.0)
@@ -165,7 +165,7 @@ GEM
165
165
  net-protocol
166
166
  net-protocol (0.4.0)
167
167
  timeout
168
- net-smtp (0.5.1)
168
+ net-smtp (0.5.2)
169
169
  net-protocol
170
170
  nio4r (2.7.5)
171
171
  nokogiri (1.15.7)
@@ -177,14 +177,14 @@ GEM
177
177
  racc (~> 1.4)
178
178
  pp (0.6.4)
179
179
  prettyprint
180
- prettyprint (0.2.0)
181
- prism (1.9.0)
180
+ prettyprint (0.2.1)
181
+ prism (2.1.0)
182
182
  psych (5.5.0)
183
183
  date
184
184
  stringio
185
185
  raabro (1.5.0)
186
186
  racc (1.8.1)
187
- rack (3.2.7)
187
+ rack (3.2.8)
188
188
  rack-protection (4.2.1)
189
189
  base64 (>= 0.1.0)
190
190
  logger (>= 1.6.0)
@@ -192,7 +192,7 @@ GEM
192
192
  rack-session (2.1.2)
193
193
  base64 (>= 0.1.0)
194
194
  rack (>= 3.0.0)
195
- rack-test (2.2.0)
195
+ rack-test (2.3.0)
196
196
  rack (>= 1.3)
197
197
  rackup (2.3.1)
198
198
  rack (>= 3)
@@ -234,7 +234,7 @@ GEM
234
234
  tsort
235
235
  redis (5.4.1)
236
236
  redis-client (>= 0.22.0)
237
- redis-client (0.30.1)
237
+ redis-client (0.31.0)
238
238
  connection_pool
239
239
  redis-namespace (1.11.0)
240
240
  redis (>= 4)
@@ -258,17 +258,17 @@ GEM
258
258
  rspec-core (~> 3.13.0)
259
259
  rspec-expectations (~> 3.13.0)
260
260
  rspec-mocks (~> 3.13.0)
261
- rspec-core (3.13.6)
261
+ rspec-core (3.13.7)
262
262
  rspec-support (~> 3.13.0)
263
- rspec-expectations (3.13.5)
263
+ rspec-expectations (3.13.6)
264
264
  diff-lcs (>= 1.2.0, < 2.0)
265
265
  rspec-support (~> 3.13.0)
266
- rspec-mocks (3.13.8)
266
+ rspec-mocks (3.13.9)
267
267
  diff-lcs (>= 1.2.0, < 2.0)
268
268
  rspec-support (~> 3.13.0)
269
269
  rspec-retry (0.6.2)
270
270
  rspec-core (> 3.3)
271
- rspec-support (3.13.7)
271
+ rspec-support (3.13.8)
272
272
  rufus-scheduler (3.9.2)
273
273
  fugit (~> 1.1, >= 1.11.1)
274
274
  securerandom (0.3.2)
@@ -9,14 +9,14 @@ GIT
9
9
  PATH
10
10
  remote: ../../sentry-rails
11
11
  specs:
12
- sentry-rails (7.0.0)
12
+ sentry-rails (7.2.0)
13
13
  railties (>= 5.2.0)
14
- sentry-ruby (~> 7.0.0)
14
+ sentry-ruby (~> 7.2.0)
15
15
 
16
16
  PATH
17
17
  remote: ../../sentry-ruby
18
18
  specs:
19
- sentry-ruby (7.0.0)
19
+ sentry-ruby (7.2.0)
20
20
  bigdecimal
21
21
  concurrent-ruby (~> 1.0, >= 1.0.2)
22
22
  logger
@@ -24,9 +24,9 @@ PATH
24
24
  PATH
25
25
  remote: ..
26
26
  specs:
27
- sentry-resque (7.0.0)
27
+ sentry-resque (7.2.0)
28
28
  resque (>= 1.24)
29
- sentry-ruby (~> 7.0.0)
29
+ sentry-ruby (~> 7.2.0)
30
30
 
31
31
  GEM
32
32
  remote: https://rubygems.org/
@@ -117,8 +117,8 @@ GEM
117
117
  cgi (0.5.2)
118
118
  concurrent-ruby (1.3.8)
119
119
  connection_pool (2.5.5)
120
- crass (1.0.7)
121
- date (3.5.1)
120
+ crass (1.0.8)
121
+ date (3.6.0)
122
122
  diff-lcs (1.6.2)
123
123
  docile (1.4.1)
124
124
  drb (2.2.3)
@@ -134,8 +134,8 @@ GEM
134
134
  activesupport (>= 6.1)
135
135
  i18n (1.14.8)
136
136
  concurrent-ruby (~> 1.0)
137
- io-console (0.9.4)
138
- irb (1.18.0)
137
+ io-console (0.9.5)
138
+ irb (1.19.0)
139
139
  pp (>= 0.6.0)
140
140
  prism (>= 1.3.0)
141
141
  rdoc (>= 4.0.0)
@@ -165,7 +165,7 @@ GEM
165
165
  net-protocol
166
166
  net-protocol (0.4.0)
167
167
  timeout
168
- net-smtp (0.5.1)
168
+ net-smtp (0.5.2)
169
169
  net-protocol
170
170
  nio4r (2.7.5)
171
171
  nokogiri (1.17.2-aarch64-linux)
@@ -182,14 +182,14 @@ GEM
182
182
  racc (~> 1.4)
183
183
  pp (0.6.4)
184
184
  prettyprint
185
- prettyprint (0.2.0)
185
+ prettyprint (0.2.1)
186
186
  prism (1.9.0)
187
187
  psych (5.5.0)
188
188
  date
189
189
  stringio
190
190
  raabro (1.5.0)
191
191
  racc (1.8.1)
192
- rack (3.2.7)
192
+ rack (3.2.8)
193
193
  rack-protection (4.2.1)
194
194
  base64 (>= 0.1.0)
195
195
  logger (>= 1.6.0)
@@ -197,7 +197,7 @@ GEM
197
197
  rack-session (2.1.2)
198
198
  base64 (>= 0.1.0)
199
199
  rack (>= 3.0.0)
200
- rack-test (2.2.0)
200
+ rack-test (2.3.0)
201
201
  rack (>= 1.3)
202
202
  rackup (2.3.1)
203
203
  rack (>= 3)
@@ -241,7 +241,7 @@ GEM
241
241
  tsort
242
242
  redis (5.4.1)
243
243
  redis-client (>= 0.22.0)
244
- redis-client (0.30.1)
244
+ redis-client (0.31.0)
245
245
  connection_pool
246
246
  redis-namespace (1.11.0)
247
247
  redis (>= 4)
@@ -265,17 +265,17 @@ GEM
265
265
  rspec-core (~> 3.13.0)
266
266
  rspec-expectations (~> 3.13.0)
267
267
  rspec-mocks (~> 3.13.0)
268
- rspec-core (3.13.6)
268
+ rspec-core (3.13.7)
269
269
  rspec-support (~> 3.13.0)
270
- rspec-expectations (3.13.5)
270
+ rspec-expectations (3.13.6)
271
271
  diff-lcs (>= 1.2.0, < 2.0)
272
272
  rspec-support (~> 3.13.0)
273
- rspec-mocks (3.13.8)
273
+ rspec-mocks (3.13.9)
274
274
  diff-lcs (>= 1.2.0, < 2.0)
275
275
  rspec-support (~> 3.13.0)
276
276
  rspec-retry (0.6.2)
277
277
  rspec-core (> 3.3)
278
- rspec-support (3.13.7)
278
+ rspec-support (3.13.8)
279
279
  ruby-lsp (0.26.11)
280
280
  language_server-protocol (~> 3.17.0)
281
281
  prism (>= 1.2, < 2.0)