sentry-ruby 4.1.6 → 4.3.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 +4 -4
- data/README.md +29 -33
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4699722aa8257fd08d1e3ecec1765538088bf3c3a2e24925fd48686f713284c5
|
4
|
+
data.tar.gz: a62e7133447d5245b237ee4bf7c0775e62f8f62e729ffcb13d6f2581aaf68eb0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 268cdfa364a00efdf99cc7f13638f2e79855b142507e52244b25038a036b88a5422e713763a36f983adc66fb067b6439fe691db0574b7417c84c371448303971
|
7
|
+
data.tar.gz: 8a3192b84569cb160dd9dbbc2d7b01047688779cbfe89ca6bc395c2ad135750fabaee04c1e329cb78d4d4d38f4e4da445481049ed3e87b4b936f5032082c1d2e
|
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
|
-
|
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
|
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
|
|
@@ -67,7 +72,7 @@ end
|
|
67
72
|
|
68
73
|
### Sentry doesn't report some kinds of data by default
|
69
74
|
|
70
|
-
**Sentry ignores some exceptions by default** - most of these are related to 404s parameter parsing errors. [For a complete list, see the `IGNORE_DEFAULT` constant](https://github.com/getsentry/sentry-ruby/blob/master/sentry-ruby/lib/sentry/configuration.rb#
|
75
|
+
**Sentry ignores some exceptions by default** - most of these are related to 404s parameter parsing errors. [For a complete list, see the `IGNORE_DEFAULT` constant](https://github.com/getsentry/sentry-ruby/blob/master/sentry-ruby/lib/sentry/configuration.rb#L151) and the integration gems' `IGNORE_DEFAULT`, like [`sentry-rails`'s](https://github.com/getsentry/sentry-ruby/blob/master/sentry-rails/lib/sentry/rails/configuration.rb#L12)
|
71
76
|
|
72
77
|
Sentry doesn't send personally identifiable information (pii) by default, such as request body, user ip or cookies. If you want those information to be sent, you can use the `send_default_pii` config option:
|
73
78
|
|
@@ -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
|
-
|
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:
|
@@ -253,8 +249,8 @@ Sentry.capture_exception(exception, tags: {foo: "bar"})
|
|
253
249
|
|
254
250
|
## More Information
|
255
251
|
|
256
|
-
|
257
|
-
|
258
|
-
|
252
|
+
- [Documentation](https://docs.sentry.io/platforms/ruby/)
|
253
|
+
- [Bug Tracker](https://github.com/getsentry/sentry-ruby/issues)
|
254
|
+
- [Forum](https://forum.sentry.io/)
|
259
255
|
- [Discord](https://discord.gg/ez5KZN7)
|
260
256
|
|
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
|
4
|
+
version: 4.3.1
|
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-
|
11
|
+
date: 2021-03-24 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
|
19
|
+
version: 4.3.1
|
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
|
26
|
+
version: 4.3.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: faraday
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|