Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update sentry-sidekiq for Sidekiq 7.1.5 #2126

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/sentry_sidekiq_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
name: Ruby ${{ matrix.ruby_version }} & Sidekiq ${{ matrix.sidekiq_version }}, options - ${{ toJson(matrix.options) }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
sidekiq_version: ['5.0', '6.0', '7.0']
ruby_version: ['2.7', '3.0', '3.1', '3.2', jruby]
Expand Down
11 changes: 8 additions & 3 deletions sentry-sidekiq/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,20 @@ gem "rexml"
gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5

sidekiq_version = ENV["SIDEKIQ_VERSION"]
sidekiq_version = "6.0" if sidekiq_version.nil?
sidekiq_version = "7.0" if sidekiq_version.nil?

gem "sidekiq", "~> #{sidekiq_version}"
gem "rails"

if RUBY_VERSION.to_f >= 2.6
ruby_version = Gem::Version.new(RUBY_VERSION)

if ruby_version >= Gem::Version.new("2.6.0")
gem "debug", github: "ruby/debug", platform: :ruby
gem "irb"

if ruby_version >= Gem::Version.new("3.0.0")
gem "ruby-lsp-rspec"
end
end

gem "pry"

4 changes: 4 additions & 0 deletions sentry-sidekiq/lib/sentry/sidekiq/error_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ def call(ex, context)
scope&.clear
end

def arity
method(:call).arity
end

private

def retryable?(context)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,11 @@

q = queue.to_a
expect(q.size).to be(2)
first_headers = q.first["trace_propagation_headers"]
first_headers = q[0]["trace_propagation_headers"]
expect(first_headers["sentry-trace"]).to eq(transaction.to_sentry_trace)
expect(first_headers["baggage"]).to eq(transaction.to_baggage)

second_headers = q.second["trace_propagation_headers"]
second_headers = q[1]["trace_propagation_headers"]
expect(second_headers["sentry-trace"]).to eq(transaction.to_sentry_trace)
expect(second_headers["baggage"]).to eq(transaction.to_baggage)
end
Expand Down
Loading