sentry-ruby 4.2.0 → 4.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +39 -55
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3792d3369a1e326b6bd53ea102a755fa307cb4420c3d87f6e6735664b2e5269f
|
4
|
+
data.tar.gz: 84334400bef82a857754e82a5e0df6c026661e3ba9705d844da4edb6b2aa78e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4782e989dde22155dad843628dc37fc501156e2b3a86a7fbfb3df425ed6043bb9263a8e9e71aad137a50bbf366c4c1a10732c07b128d0aadd5837d1779dccd52
|
7
|
+
data.tar.gz: a2699c2cc12d5bef0cbf7bce23fd4b6f78406affcab0ca72100856b7b601264d455fe5e1e66cfe7829ebd98e761ba188394bc7cfdbaba9a1d48c1d2b5f8b6422
|
data/README.md
CHANGED
@@ -2,38 +2,36 @@
|
|
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
9
|
|
10
|
-
|
10
|
+
Sentry SDK for Ruby
|
11
|
+
===========
|
11
12
|
|
12
|
-
|
13
|
+
| current version | build | coverage | downloads | semver stability |
|
14
|
+
| --- | ----- | -------- | --------- | ---------------- |
|
15
|
+
| [![Gem Version](https://img.shields.io/gem/v/sentry-ruby?label=sentry-ruby)](https://github.com/getsentry/sentry-ruby/blob/master/sentry-ruby/CHANGELOG.md) | ![Build Status](https://github.com/getsentry/sentry-ruby/workflows/sentry-ruby%20Test/badge.svg) | [![Coverage Status](https://img.shields.io/codecov/c/github/getsentry/sentry-ruby/master?logo=codecov)](https://codecov.io/gh/getsentry/sentry-ruby/branch/master) | [![Downloads](https://img.shields.io/gem/dt/sentry-ruby.svg)](https://rubygems.org/gems/sentry-ruby/) | [![SemVer stability](https://api.dependabot.com/badges/compatibility_score?dependency-name=sentry-ruby&package-manager=bundler&version-scheme=semver)](https://dependabot.com/compatibility-score.html?dependency-name=sentry-ruby&package-manager=bundler&version-scheme=semver) |
|
16
|
+
| [![Gem Version](https://img.shields.io/gem/v/sentry-rails?label=sentry-rails)](https://github.com/getsentry/sentry-ruby/blob/master/sentry-rails/CHANGELOG.md) | ![Build Status](https://github.com/getsentry/sentry-ruby/workflows/sentry-rails%20Test/badge.svg) | [![Coverage Status](https://img.shields.io/codecov/c/github/getsentry/sentry-ruby/master?logo=codecov)](https://codecov.io/gh/getsentry/sentry-ruby/branch/master) | [![Downloads](https://img.shields.io/gem/dt/sentry-rails.svg)](https://rubygems.org/gems/sentry-rails/) | [![SemVer stability](https://api.dependabot.com/badges/compatibility_score?dependency-name=sentry-rails&package-manager=bundler&version-scheme=semver)](https://dependabot.com/compatibility-score.html?dependency-name=sentry-rails&package-manager=bundler&version-scheme=semver) |
|
17
|
+
| [![Gem Version](https://img.shields.io/gem/v/sentry-sidekiq?label=sentry-sidekiq)](https://github.com/getsentry/sentry-ruby/blob/master/sentry-sidekiq/CHANGELOG.md) | ![Build Status](https://github.com/getsentry/sentry-ruby/workflows/sentry-sidekiq%20Test/badge.svg) | [![Coverage Status](https://img.shields.io/codecov/c/github/getsentry/sentry-ruby/master?logo=codecov)](https://codecov.io/gh/getsentry/sentry-ruby/branch/master) | [![Downloads](https://img.shields.io/gem/dt/sentry-sidekiq.svg)](https://rubygems.org/gems/sentry-sidekiq/) | [![SemVer stability](https://api.dependabot.com/badges/compatibility_score?dependency-name=sentry-sidekiq&package-manager=bundler&version-scheme=semver)](https://dependabot.com/compatibility-score.html?dependency-name=sentry-sidekiq&package-manager=bundler&version-scheme=semver) |
|
18
|
+
| [![Gem Version](https://img.shields.io/gem/v/sentry-delayed_job?label=sentry-delayed_job)](https://github.com/getsentry/sentry-ruby/blob/master/sentry-delayed_job/CHANGELOG.md) | ![Build Status](https://github.com/getsentry/sentry-ruby/workflows/sentry-delayed_job%20Test/badge.svg) | [![Coverage Status](https://img.shields.io/codecov/c/github/getsentry/sentry-ruby/master?logo=codecov)](https://codecov.io/gh/getsentry/sentry-ruby/branch/master) | [![Downloads](https://img.shields.io/gem/dt/sentry-delayed_job.svg)](https://rubygems.org/gems/sentry-delayed_job/) | [![SemVer stability](https://api.dependabot.com/badges/compatibility_score?dependency-name=sentry-delayed_job&package-manager=bundler&version-scheme=semver)](https://dependabot.com/compatibility-score.html?dependency-name=sentry-delayed_job&package-manager=bundler&version-scheme=semver) |
|
13
19
|
|
14
20
|
|
15
|
-
[![Gem Version](https://img.shields.io/gem/v/sentry-ruby.svg)](https://rubygems.org/gems/sentry-ruby)
|
16
|
-
![Build Status](https://github.com/getsentry/sentry-ruby/workflows/sentry-ruby%20Test/badge.svg)
|
17
|
-
[![Coverage Status](https://img.shields.io/codecov/c/github/getsentry/sentry-ruby/master?logo=codecov)](https://codecov.io/gh/getsentry/sentry-ruby/branch/master)
|
18
|
-
[![Gem](https://img.shields.io/gem/dt/sentry-ruby.svg)](https://rubygems.org/gems/sentry-ruby/)
|
19
|
-
[![SemVer](https://api.dependabot.com/badges/compatibility_score?dependency-name=sentry-ruby&package-manager=bundler&version-scheme=semver)](https://dependabot.com/compatibility-score.html?dependency-name=sentry-ruby&package-manager=bundler&version-scheme=semver)
|
20
21
|
|
21
22
|
|
22
|
-
|
23
|
+
## Migrate From sentry-raven
|
23
24
|
|
24
|
-
The
|
25
|
+
**The old `sentry-raven` client has entered maintenance mode and was moved to [here](https://github.com/getsentry/sentry-ruby/tree/master/sentry-raven).**
|
25
26
|
|
27
|
+
If you're using `sentry-raven`, we recommend you to migrate to this new SDK. You can find the benefits of migrating and how to do it in our [migration guide](https://docs.sentry.io/platforms/ruby/migration/).
|
26
28
|
|
27
29
|
## Requirements
|
28
30
|
|
29
|
-
We test on Ruby 2.4, 2.5, 2.6
|
31
|
+
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
32
|
|
31
33
|
If you use self-hosted Sentry, please also make sure its version is above `20.6.0`.
|
32
34
|
|
33
|
-
## Migrate From sentry-raven
|
34
|
-
|
35
|
-
If you're using `sentry-raven`, we recommend you to migrate to this new SDK. You can find the benefits of migrating and how to do it in our [migration guide](https://docs.sentry.io/platforms/ruby/migration/).
|
36
|
-
|
37
35
|
## Getting Started
|
38
36
|
|
39
37
|
### Install
|
@@ -47,6 +45,7 @@ and depends on the integrations you want to have, you might also want to install
|
|
47
45
|
```ruby
|
48
46
|
gem "sentry-rails"
|
49
47
|
gem "sentry-sidekiq"
|
48
|
+
gem "sentry-delayed_job"
|
50
49
|
# and mores to come in the future!
|
51
50
|
```
|
52
51
|
|
@@ -67,7 +66,7 @@ end
|
|
67
66
|
|
68
67
|
### Sentry doesn't report some kinds of data by default
|
69
68
|
|
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#
|
69
|
+
**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
70
|
|
72
71
|
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
72
|
|
@@ -136,6 +135,7 @@ We also provide integrations with popular frameworks/libraries with the related
|
|
136
135
|
|
137
136
|
- [sentry-rails](https://github.com/getsentry/sentry-ruby/tree/master/sentry-rails)
|
138
137
|
- [sentry-sidekiq](https://github.com/getsentry/sentry-ruby/tree/master/sentry-sidekiq)
|
138
|
+
- [sentry-delayed_job](https://github.com/getsentry/sentry-ruby/tree/master/sentry-delayed_job)
|
139
139
|
|
140
140
|
### More configuration
|
141
141
|
|
@@ -143,38 +143,7 @@ You're all set - but there's a few more settings you may want to know about too!
|
|
143
143
|
|
144
144
|
#### Blocking v.s. Non-blocking
|
145
145
|
|
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
|
-
discard_on ActiveJob::DeserializationError # this will prevent infinite loop when there's an issue deserializing SentryJob
|
164
|
-
|
165
|
-
def perform(event, hint)
|
166
|
-
Sentry.send_event(event, hint)
|
167
|
-
end
|
168
|
-
end
|
169
|
-
```
|
170
|
-
|
171
|
-
If you also use `sentry-rails`, you can directly use the job we defined for you:
|
172
|
-
|
173
|
-
```ruby
|
174
|
-
config.async = lambda { |event, hint| Sentry::SendEventJob.perform_later(event, hint) }
|
175
|
-
```
|
176
|
-
|
177
|
-
**After version 4.1.0**, `sentry-ruby` sends events asynchronously by default. The functionality works like this:
|
146
|
+
`sentry-ruby` sends events asynchronously by default. The functionality works like this:
|
178
147
|
|
179
148
|
1. When the SDK is initialized, a `Sentry::BackgroundWorker` will be initialized too.
|
180
149
|
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.
|
@@ -208,6 +177,21 @@ If you want to send a particular event immediately, you can use event hints to d
|
|
208
177
|
Sentry.capture_message("send me now!", hint: { background: false })
|
209
178
|
```
|
210
179
|
|
180
|
+
##### `config.async`
|
181
|
+
|
182
|
+
You can also use `config.async` to send events with you own worker:
|
183
|
+
|
184
|
+
```ruby
|
185
|
+
config.async = lambda { |event, hint| SentryJob.perform_later(event, hint) }
|
186
|
+
```
|
187
|
+
|
188
|
+
And if you use `sentry-rails`, you can directly use the job we defined for you:
|
189
|
+
|
190
|
+
```ruby
|
191
|
+
config.async = lambda { |event, hint| Sentry::SendEventJob.perform_later(event, hint) }
|
192
|
+
```
|
193
|
+
|
194
|
+
|
211
195
|
#### Contexts
|
212
196
|
|
213
197
|
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:
|
@@ -257,10 +241,10 @@ Of course, you can always assign the information on a per-event basis:
|
|
257
241
|
Sentry.capture_exception(exception, tags: {foo: "bar"})
|
258
242
|
```
|
259
243
|
|
260
|
-
##
|
261
|
-
|
262
|
-
* [Documentation](https://docs.sentry.io/platforms/ruby/)
|
263
|
-
* [Bug Tracker](https://github.com/getsentry/sentry-ruby/issues)
|
264
|
-
* [Forum](https://forum.sentry.io/)
|
265
|
-
- [Discord](https://discord.gg/ez5KZN7)
|
244
|
+
## Resources
|
266
245
|
|
246
|
+
* [![Ruby docs](https://img.shields.io/badge/documentation-sentry.io-green.svg?label=ruby%20docs)](https://docs.sentry.io/platforms/ruby/)
|
247
|
+
* [![Forum](https://img.shields.io/badge/forum-sentry-green.svg)](https://forum.sentry.io/c/sdks)
|
248
|
+
* [![Discord Chat](https://img.shields.io/discord/621778831602221064?logo=discord&logoColor=ffffff&color=7389D8)](https://discord.gg/PXa5Apfe7K)
|
249
|
+
* [![Stack Overflow](https://img.shields.io/badge/stack%20overflow-sentry-green.svg)](https://stackoverflow.com/questions/tagged/sentry)
|
250
|
+
* [![Twitter Follow](https://img.shields.io/twitter/follow/getsentry?label=getsentry&style=social)](https://twitter.com/intent/follow?screen_name=getsentry)
|
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.2
|
4
|
+
version: 4.3.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-
|
11
|
+
date: 2021-04-06 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.2
|
19
|
+
version: 4.3.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.2
|
26
|
+
version: 4.3.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: faraday
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -90,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
90
|
- !ruby/object:Gem::Version
|
91
91
|
version: '0'
|
92
92
|
requirements: []
|
93
|
-
rubygems_version: 3.0.3
|
93
|
+
rubygems_version: 3.0.3.1
|
94
94
|
signing_key:
|
95
95
|
specification_version: 4
|
96
96
|
summary: A gem that provides a client interface for the Sentry error logger
|