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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3dcbdbb06dfb5f66f6f2c0eaf94d16acd55b5a977908c39ea2623df6185a9304
4
- data.tar.gz: edf38d17f4163966a3173c25440acff488c5aaf155926843526458bf7f8ee2cd
3
+ metadata.gz: 06ff7807f2ed20afd1ddbb25fdefca1d4fa031ed3e7f5a00b0e1070be3b33a46
4
+ data.tar.gz: 5653d9635ed8c25f8adf20e7913c12953b4ba8acaf515020cc5859804053abac
5
5
  SHA512:
6
- metadata.gz: b39e448dd3cb7178a23b6df2ac22c548d465178b6a2303235aa43c868adc69dbcc37b50b0e1cd290d35802d4d9f1c5d4ac9d8fb24786120f93843743c036d476
7
- data.tar.gz: '0840c9eb5f8dd8c0a0f90b4a511b3713aba46c6c6aa4e7c5cfa9d44ef5fe463ac0f2f535880e0addc77e63d283f90d55aae143f9ec281ffdad0f7a9623131465'
6
+ metadata.gz: ff3cc9abe9105fbfd68b843cc6146d7612e31b96c71bcfcaba346ff0399d3c8e55de2b6e8532a3fb47a7fa41cd4605a83e1b1123678bee8cd3fe0477e20b36bf
7
+ data.tar.gz: 900d1648fff07895107620ae91e58ee006de41fc2735a16e8f56e5d5d579f68977c729f84614955f2334ab1a9bb973e65aee7c97fc11f08c36d44989d5033c72
data/.craft.yml CHANGED
@@ -12,7 +12,7 @@ artifactProvider:
12
12
  targets:
13
13
  - name: gem
14
14
  - name: github
15
- tagPrefix: sentry-sidekiq
15
+ tagPrefix: sentry-sidekiq-v
16
16
  - name: registry
17
17
  type: sdk
18
18
  config:
@@ -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
- # sentry-sidekiq
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
- ## Installation
8
+ # sentry-sidekiq, the Sidekiq integration for Sentry's Ruby client
4
9
 
5
- Add this line to your application's Gemfile:
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
- You can also see the example under the `/example` folder.
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
- ## Development
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
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
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
- ## Contributing
25
+ ## Getting Started
29
26
 
30
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/sentry-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/sentry-ruby/blob/master/CODE_OF_CONDUCT.md).
27
+ ### Install
31
28
 
29
+ ```ruby
30
+ gem "sentry-ruby"
31
+ gem "sentry-sidekiq"
32
+ ```
32
33
 
33
- ## License
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
@@ -1,6 +1,8 @@
1
1
  require "bundler/gem_tasks"
2
2
  require "rspec/core/rake_task"
3
3
 
4
- RSpec::Core::RakeTask.new(:spec)
4
+ RSpec::Core::RakeTask.new(:spec).tap do |task|
5
+ task.rspec_opts = "--order rand"
6
+ end
5
7
 
6
8
  task :default => :spec
@@ -1,5 +1,5 @@
1
1
  require "sidekiq"
2
- require "sentry/sidekiq"
2
+ require "sentry-sidekiq"
3
3
 
4
4
  Sentry.init do |config|
5
5
  config.breadcrumbs_logger = [:sentry_logger]
@@ -1,5 +1,6 @@
1
1
  require "sidekiq"
2
- require "sentry"
2
+ require "sentry-ruby"
3
+ require "sentry/sidekiq/version"
3
4
  require "sentry/sidekiq/error_handler"
4
5
  require "sentry/sidekiq/cleanup_middleware"
5
6
  # require "sentry/sidekiq/configuration"
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Sentry
2
2
  module Sidekiq
3
- VERSION = "0.1.1"
3
+ VERSION = "4.1.0"
4
4
  end
5
5
  end
@@ -22,5 +22,5 @@ Gem::Specification.new do |spec|
22
22
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
23
  spec.require_paths = ["lib"]
24
24
 
25
- spec.add_dependency "sentry-ruby"
25
+ spec.add_dependency "sentry-ruby", ">= 4.1.0"
26
26
  end
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: 0.1.1
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-06 00:00:00.000000000 Z
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: '0'
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: '0'
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/sidekiq.rb
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