sentry-sidekiq 0.1.1 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.craft.yml +1 -1
- data/CHANGELOG.md +21 -0
- data/README.md +22 -27
- data/Rakefile +3 -1
- data/example/error_worker.rb +1 -1
- data/lib/{sentry/sidekiq.rb → sentry-sidekiq.rb} +2 -1
- data/lib/sentry/sidekiq/cleanup_middleware.rb +3 -1
- data/lib/sentry/sidekiq/error_handler.rb +3 -1
- data/lib/sentry/sidekiq/version.rb +1 -1
- data/sentry-sidekiq.gemspec +1 -1
- 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: 06ff7807f2ed20afd1ddbb25fdefca1d4fa031ed3e7f5a00b0e1070be3b33a46
|
4
|
+
data.tar.gz: 5653d9635ed8c25f8adf20e7913c12953b4ba8acaf515020cc5859804053abac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff3cc9abe9105fbfd68b843cc6146d7612e31b96c71bcfcaba346ff0399d3c8e55de2b6e8532a3fb47a7fa41cd4605a83e1b1123678bee8cd3fe0477e20b36bf
|
7
|
+
data.tar.gz: 900d1648fff07895107620ae91e58ee006de41fc2735a16e8f56e5d5d579f68977c729f84614955f2334ab1a9bb973e65aee7c97fc11f08c36d44989d5033c72
|
data/.craft.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,26 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 4.1.0
|
4
|
+
|
5
|
+
- Check SDK initialization before running integrations [#1151](https://github.com/getsentry/sentry-ruby/pull/1151)
|
6
|
+
- Fixes [#1145](https://github.com/getsentry/sentry-ruby/pull/1145)
|
7
|
+
|
8
|
+
## 4.0.0
|
9
|
+
|
10
|
+
- Only documents update for the official release and no API/feature changes.
|
11
|
+
|
12
|
+
## 0.2.0
|
13
|
+
|
14
|
+
- Major API changes: [1123](https://github.com/getsentry/sentry-ruby/pull/1123)
|
15
|
+
|
16
|
+
## 0.1.3
|
17
|
+
|
18
|
+
- Small fixes
|
19
|
+
|
20
|
+
## 0.1.2
|
21
|
+
|
22
|
+
Fix require reference
|
23
|
+
|
3
24
|
## 0.1.1
|
4
25
|
|
5
26
|
Release test
|
data/README.md
CHANGED
@@ -1,39 +1,34 @@
|
|
1
|
-
|
1
|
+
<p align="center">
|
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">
|
4
|
+
</a>
|
5
|
+
<br>
|
6
|
+
</p>
|
2
7
|
|
3
|
-
|
8
|
+
# sentry-sidekiq, the Sidekiq integration for Sentry's Ruby client
|
4
9
|
|
5
|
-
|
10
|
+
---
|
6
11
|
|
7
|
-
```ruby
|
8
|
-
gem 'sentry-sidekiq'
|
9
|
-
```
|
10
|
-
|
11
|
-
And then execute:
|
12
|
-
|
13
|
-
$ bundle install
|
14
|
-
|
15
|
-
## Usage
|
16
|
-
|
17
|
-
See `sentry-ruby` for how to configure the Sentry client.
|
18
12
|
|
19
|
-
|
13
|
+
[![Gem Version](https://img.shields.io/gem/v/sentry-sidekiq.svg)](https://rubygems.org/gems/sentry-sidekiq)
|
14
|
+
![Build Status](https://github.com/getsentry/sentry-ruby/workflows/sentry-sidekiq%20Test/badge.svg)
|
15
|
+
[![Coverage Status](https://img.shields.io/codecov/c/github/getsentry/sentry-ruby/master?logo=codecov)](https://codecov.io/gh/getsentry/sentry-ruby/branch/master)
|
16
|
+
[![Gem](https://img.shields.io/gem/dt/sentry-sidekiq.svg)](https://rubygems.org/gems/sentry-sidekiq/)
|
17
|
+
[![SemVer](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)
|
20
18
|
|
21
19
|
|
22
|
-
|
20
|
+
[Documentation](https://docs.sentry.io/platforms/ruby/guides/sidekiq/) | [Bug Tracker](https://github.com/getsentry/sentry-ruby/issues) | [Forum](https://forum.sentry.io/) | IRC: irc.freenode.net, #sentry
|
23
21
|
|
24
|
-
|
22
|
+
The official Ruby-language client and integration layer for the [Sentry](https://github.com/getsentry/sentry) error reporting API.
|
25
23
|
|
26
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
27
24
|
|
28
|
-
##
|
25
|
+
## Getting Started
|
29
26
|
|
30
|
-
|
27
|
+
### Install
|
31
28
|
|
29
|
+
```ruby
|
30
|
+
gem "sentry-ruby"
|
31
|
+
gem "sentry-sidekiq"
|
32
|
+
```
|
32
33
|
|
33
|
-
|
34
|
-
|
35
|
-
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
36
|
-
|
37
|
-
## Code of Conduct
|
38
|
-
|
39
|
-
Everyone interacting in the Sentry::Ruby project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/sentry-ruby/blob/master/CODE_OF_CONDUCT.md).
|
34
|
+
Then you're all set! `sentry-sidekiq` will automatically insert a custom middleware and error handler to capture exceptions from your workers!
|
data/Rakefile
CHANGED
data/example/error_worker.rb
CHANGED
@@ -2,6 +2,8 @@ module Sentry
|
|
2
2
|
module Sidekiq
|
3
3
|
class CleanupMiddleware
|
4
4
|
def call(_worker, job, queue)
|
5
|
+
return yield unless Sentry.initialized?
|
6
|
+
|
5
7
|
Sentry.clone_hub_to_current_thread
|
6
8
|
Sentry.with_scope do |scope|
|
7
9
|
scope.set_extras(sidekiq: job.merge("queue" => queue))
|
@@ -10,7 +12,7 @@ module Sentry
|
|
10
12
|
begin
|
11
13
|
yield
|
12
14
|
rescue => ex
|
13
|
-
Sentry.capture_exception(ex)
|
15
|
+
Sentry.capture_exception(ex, hint: { background: false })
|
14
16
|
end
|
15
17
|
end
|
16
18
|
end
|
@@ -6,13 +6,15 @@ module Sentry
|
|
6
6
|
SIDEKIQ_NAME = "Sidekiq".freeze
|
7
7
|
|
8
8
|
def call(ex, context)
|
9
|
+
return unless Sentry.initialized?
|
9
10
|
context = Sentry::Sidekiq::ContextFilter.new.filter_context(context)
|
10
11
|
|
11
12
|
Sentry.with_scope do |scope|
|
12
13
|
scope.set_transaction_name transaction_from_context(context)
|
13
14
|
Sentry.capture_exception(
|
14
15
|
ex,
|
15
|
-
extra: { sidekiq: context }
|
16
|
+
extra: { sidekiq: context },
|
17
|
+
hint: { background: false }
|
16
18
|
)
|
17
19
|
end
|
18
20
|
end
|
data/sentry-sidekiq.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sentry-sidekiq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sentry Team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sentry-ruby
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 4.1.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:
|
26
|
+
version: 4.1.0
|
27
27
|
description: A gem that provides Sidekiq integration for the Sentry error logger
|
28
28
|
email: accounts@sentry.io
|
29
29
|
executables: []
|
@@ -48,7 +48,7 @@ files:
|
|
48
48
|
- example/README.md
|
49
49
|
- example/config/sidekiq.yml
|
50
50
|
- example/error_worker.rb
|
51
|
-
- lib/sentry
|
51
|
+
- lib/sentry-sidekiq.rb
|
52
52
|
- lib/sentry/sidekiq/cleanup_middleware.rb
|
53
53
|
- lib/sentry/sidekiq/context_filter.rb
|
54
54
|
- lib/sentry/sidekiq/error_handler.rb
|