sentry-ruby 4.1.5 → 4.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +25 -29
  3. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d5b6dac8f89a557f5c39b840cd9523355c96ba30bd9e713655bd7ebc2a3dcdf0
4
- data.tar.gz: d779c5deb961ae968638e74c787284c35f81dcf65d35203fe66b01413c166f46
3
+ metadata.gz: 3f450d4675e2f6de879b83853aace0c6051ea680b35832da76a156b3a5d49fea
4
+ data.tar.gz: 392b363545f23cb65bc2b4a55afaab8767ad6a10f7f74b8d210b29218723dd79
5
5
  SHA512:
6
- metadata.gz: 33516c955431dc91ab472d03917a2037af30682e4b2e7426621de98883ca7c5d92e4dd577163989caeecbf1c6e1a34cf92d2785d3305e660001614be451fb7da
7
- data.tar.gz: 30f0e8aab4ff6fa6def5f062497bcb16c3c152580a9185e27bfc0ed4ac2bdd00bef4a0e79df7e92f0d82b5159bdef3d140b197e9e0b64799a67b6a06a0874c0d
6
+ metadata.gz: 98571bdbba234d79a982596afeb34549def742ad0f4a109af7f61c3d97ea49bddd6f7f65d099c59b6e40f97194f828161b62010216966b44dc3723c36a538543
7
+ data.tar.gz: c1e513dac483417242989841078adb5c674e7668518c95e1d7246f4b276650d5a45f11ae7f02e3250fbbb6cfc78e0bfdac08d8afb45ba8e59ec11dc409626b33
data/README.md CHANGED
@@ -2,10 +2,14 @@
2
2
  <a href="https://sentry.io" target="_blank" align="center">
3
3
  <img src="https://sentry-brand.storage.googleapis.com/sentry-logo-black.png" width="280">
4
4
  </a>
5
- <br>
5
+ <br />
6
6
  </p>
7
7
 
8
- # sentry-ruby, the Ruby Client for Sentry
8
+ _Bad software is everywhere, and we're tired of it. Sentry is on a mission to help developers write better software faster, so we can get back to enjoying technology. If you want to join us [<kbd>**Check out our open positions**</kbd>](https://sentry.io/careers/)_
9
+
10
+ Sentry SDK for Ruby
11
+ ===========
12
+
9
13
 
10
14
  **The old `sentry-raven` client has entered maintenance mode and was moved to [here](https://github.com/getsentry/sentry-ruby/tree/master/sentry-raven).**
11
15
 
@@ -26,7 +30,7 @@ The official Ruby-language client and integration layer for the [Sentry](https:/
26
30
 
27
31
  ## Requirements
28
32
 
29
- We test on Ruby 2.4, 2.5, 2.6 and 2.7 at the latest patchlevel/teeny version. We also support JRuby 9.0.
33
+ We test on Ruby 2.4, 2.5, 2.6, 2.7, and 3.0 at the latest patchlevel/teeny version. We also support JRuby 9.0.
30
34
 
31
35
  If you use self-hosted Sentry, please also make sure its version is above `20.6.0`.
32
36
 
@@ -47,6 +51,7 @@ and depends on the integrations you want to have, you might also want to install
47
51
  ```ruby
48
52
  gem "sentry-rails"
49
53
  gem "sentry-sidekiq"
54
+ gem "sentry-delayed_job"
50
55
  # and mores to come in the future!
51
56
  ```
52
57
 
@@ -136,6 +141,7 @@ We also provide integrations with popular frameworks/libraries with the related
136
141
 
137
142
  - [sentry-rails](https://github.com/getsentry/sentry-ruby/tree/master/sentry-rails)
138
143
  - [sentry-sidekiq](https://github.com/getsentry/sentry-ruby/tree/master/sentry-sidekiq)
144
+ - [sentry-delayed_job](https://github.com/getsentry/sentry-ruby/tree/master/sentry-delayed_job)
139
145
 
140
146
  ### More configuration
141
147
 
@@ -143,32 +149,7 @@ You're all set - but there's a few more settings you may want to know about too!
143
149
 
144
150
  #### Blocking v.s. Non-blocking
145
151
 
146
- **Before version 4.1.0**, `sentry-ruby` sends every event immediately. But it can be configured to send asynchronously:
147
-
148
- ```ruby
149
- config.async = lambda { |event, hint|
150
- Thread.new { Sentry.send_event(event, hint) }
151
- }
152
- ```
153
-
154
- Using a thread to send events will be adequate for truly parallel Ruby platforms such as JRuby, though the benefit on MRI/CRuby will be limited. If the async callback raises an exception, Sentry will attempt to send synchronously.
155
-
156
- Note that the naive example implementation has a major drawback - it can create an infinite number of threads. We recommend creating a background job, using your background job processor, that will send Sentry notifications in the background.
157
-
158
- ```ruby
159
- config.async = lambda { |event, hint| SentryJob.perform_later(event, hint) }
160
-
161
- class SentryJob < ActiveJob::Base
162
- queue_as :default
163
-
164
- def perform(event, hint)
165
- Sentry.send_event(event, hint)
166
- end
167
- end
168
- ```
169
-
170
-
171
- **After version 4.1.0**, `sentry-ruby` sends events asynchronously by default. The functionality works like this:
152
+ `sentry-ruby` sends events asynchronously by default. The functionality works like this:
172
153
 
173
154
  1. When the SDK is initialized, a `Sentry::BackgroundWorker` will be initialized too.
174
155
  2. When an event is passed to `Client#capture_event`, instead of sending it directly with `Client#send_event`, we'll let the worker do it.
@@ -202,6 +183,21 @@ If you want to send a particular event immediately, you can use event hints to d
202
183
  Sentry.capture_message("send me now!", hint: { background: false })
203
184
  ```
204
185
 
186
+ ##### `config.async`
187
+
188
+ You can also use `config.async` to send events with you own worker:
189
+
190
+ ```ruby
191
+ config.async = lambda { |event, hint| SentryJob.perform_later(event, hint) }
192
+ ```
193
+
194
+ And if you use `sentry-rails`, you can directly use the job we defined for you:
195
+
196
+ ```ruby
197
+ config.async = lambda { |event, hint| Sentry::SendEventJob.perform_later(event, hint) }
198
+ ```
199
+
200
+
205
201
  #### Contexts
206
202
 
207
203
  In sentry-ruby, every event will inherit their contextual data from the current scope. So you can enrich the event's data by configuring the current scope like:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sentry-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.5
4
+ version: 4.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sentry Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-27 00:00:00.000000000 Z
11
+ date: 2021-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sentry-ruby-core
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 4.1.5
19
+ version: 4.3.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 4.1.5
26
+ version: 4.3.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: faraday
29
29
  requirement: !ruby/object:Gem::Requirement