sentry-ruby 4.1.5.pre.beta.1 → 4.2.2

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 +21 -27
  3. metadata +7 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 19159f03e785e772b517150a4ee08a529e14687b26edc43f94b2ef454432897f
4
- data.tar.gz: 8d4552a90dcd3708ba903a53afb01fdc231205e0be07e4d45d4e047e17522e6b
3
+ metadata.gz: 2d155b5c7de2f02c985d3fb58851b865b912317effcb11575fcb0591162e476a
4
+ data.tar.gz: a021e74f77640a507c04c83476cdae19fc5938fba2ab02ddc2957e4c8abcc590
5
5
  SHA512:
6
- metadata.gz: 24c204125b2b132bea13dbc4af4231e3fd2acca0ebe45d421cc3289a0d6d9093455e310700f06e24c3d89276f998440b2172f29b4d14344dd78386e6281e7d64
7
- data.tar.gz: 31c1f566274c98dbce1f3280500bc49891574f628aa5a76e74d6249080c939110c37524c5857b07c5fe6a6dd84827d57de192ae798a9deb16534fbb2734f716c
6
+ metadata.gz: 774ac5d839b028ee9889cce068cdde3dc8a5f34a32cb0db7582259ac805f4440003d188563bf00976a4a635bc3ef3610b746db63f298adca8600a682d3ab6f07
7
+ data.tar.gz: 3d29d303ab5c38cb0ea17d03c1e1e6287e5221fc4b34de33cdb21c2b3086ecafa60ba84112deb13f95af20d9966d91e6e1ff18800810b914b495fa3058b1df4b
data/README.md CHANGED
@@ -26,7 +26,9 @@ The official Ruby-language client and integration layer for the [Sentry](https:/
26
26
 
27
27
  ## Requirements
28
28
 
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.
29
+ 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
+
31
+ If you use self-hosted Sentry, please also make sure its version is above `20.6.0`.
30
32
 
31
33
  ## Migrate From sentry-raven
32
34
 
@@ -45,6 +47,7 @@ and depends on the integrations you want to have, you might also want to install
45
47
  ```ruby
46
48
  gem "sentry-rails"
47
49
  gem "sentry-sidekiq"
50
+ gem "sentry-delayed_job"
48
51
  # and mores to come in the future!
49
52
  ```
50
53
 
@@ -134,6 +137,7 @@ We also provide integrations with popular frameworks/libraries with the related
134
137
 
135
138
  - [sentry-rails](https://github.com/getsentry/sentry-ruby/tree/master/sentry-rails)
136
139
  - [sentry-sidekiq](https://github.com/getsentry/sentry-ruby/tree/master/sentry-sidekiq)
140
+ - [sentry-delayed_job](https://github.com/getsentry/sentry-ruby/tree/master/sentry-delayed_job)
137
141
 
138
142
  ### More configuration
139
143
 
@@ -141,32 +145,7 @@ You're all set - but there's a few more settings you may want to know about too!
141
145
 
142
146
  #### Blocking v.s. Non-blocking
143
147
 
144
- **Before version 4.1.0**, `sentry-ruby` sends every event immediately. But it can be configured to send asynchronously:
145
-
146
- ```ruby
147
- config.async = lambda { |event, hint|
148
- Thread.new { Sentry.send_event(event, hint) }
149
- }
150
- ```
151
-
152
- 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.
153
-
154
- 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.
155
-
156
- ```ruby
157
- config.async = lambda { |event, hint| SentryJob.perform_later(event, hint) }
158
-
159
- class SentryJob < ActiveJob::Base
160
- queue_as :default
161
-
162
- def perform(event, hint)
163
- Sentry.send_event(event, hint)
164
- end
165
- end
166
- ```
167
-
168
-
169
- **After version 4.1.0**, `sentry-ruby` sends events asynchronously by default. The functionality works like this:
148
+ `sentry-ruby` sends events asynchronously by default. The functionality works like this:
170
149
 
171
150
  1. When the SDK is initialized, a `Sentry::BackgroundWorker` will be initialized too.
172
151
  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.
@@ -200,6 +179,21 @@ If you want to send a particular event immediately, you can use event hints to d
200
179
  Sentry.capture_message("send me now!", hint: { background: false })
201
180
  ```
202
181
 
182
+ ##### `config.async`
183
+
184
+ You can also use `config.async` to send events with you own worker:
185
+
186
+ ```ruby
187
+ config.async = lambda { |event, hint| SentryJob.perform_later(event, hint) }
188
+ ```
189
+
190
+ And if you use `sentry-rails`, you can directly use the job we defined for you:
191
+
192
+ ```ruby
193
+ config.async = lambda { |event, hint| Sentry::SendEventJob.perform_later(event, hint) }
194
+ ```
195
+
196
+
203
197
  #### Contexts
204
198
 
205
199
  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.pre.beta.1
4
+ version: 4.2.2
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-21 00:00:00.000000000 Z
11
+ date: 2021-02-18 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.pre.beta.1
19
+ version: 4.2.2
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.pre.beta.1
26
+ version: 4.2.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: faraday
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -74,7 +74,7 @@ licenses:
74
74
  metadata:
75
75
  homepage_uri: https://github.com/getsentry/sentry-ruby
76
76
  source_code_uri: https://github.com/getsentry/sentry-ruby
77
- changelog_uri: https://github.com/getsentry/sentry-ruby/blob/master/CHANGELOG.md
77
+ changelog_uri: https://github.com/getsentry/sentry-ruby/blob/master/sentry-ruby/CHANGELOG.md
78
78
  post_install_message:
79
79
  rdoc_options: []
80
80
  require_paths:
@@ -86,9 +86,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
86
86
  version: '2.4'
87
87
  required_rubygems_version: !ruby/object:Gem::Requirement
88
88
  requirements:
89
- - - ">"
89
+ - - ">="
90
90
  - !ruby/object:Gem::Version
91
- version: 1.3.1
91
+ version: '0'
92
92
  requirements: []
93
93
  rubygems_version: 3.0.3
94
94
  signing_key: