Skip to content

Commit

Permalink
Pin sentry-sidekiq's Rails version
Browse files Browse the repository at this point in the history
  • Loading branch information
st0012 committed Oct 7, 2023
1 parent 742877c commit 8c6acb1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
3 changes: 1 addition & 2 deletions sentry-sidekiq/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@ sidekiq_version = ENV["SIDEKIQ_VERSION"]
sidekiq_version = "6.0" if sidekiq_version.nil?

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

if RUBY_VERSION.to_f >= 2.6
gem "debug", github: "ruby/debug", platform: :ruby
gem "irb"
end

gem "pry"

Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
execute_worker(processor, SadWorker)

expect(transport.events.count).to eq(1)
event = transport.events.first
event = transport.events[0]
expect(event.user).to eq(user)
end

Expand All @@ -36,7 +36,7 @@
execute_worker(processor, HappyWorker)

expect(transport.events.count).to eq(1)
transaction = transport.events.first
transaction = transport.events[0]
expect(transaction).not_to be_nil
expect(transaction.user).to eq(user)
end
Expand All @@ -45,7 +45,7 @@
execute_worker(processor, SadWorker)

expect(transport.events.count).to eq(2)
transaction = transport.events.first
transaction = transport.events[0]
expect(transaction.user).to eq(user)
event = transport.events.last
expect(event.user).to eq(user)
Expand All @@ -65,7 +65,7 @@
execute_worker(processor, HappyWorker, trace_propagation_headers: trace_propagation_headers)

expect(transport.events.count).to eq(1)
transaction = transport.events.first
transaction = transport.events[0]
expect(transaction).not_to be_nil
expect(transaction.contexts.dig(:trace, :trace_id)).to eq(parent_transaction.trace_id)
end
Expand Down 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

0 comments on commit 8c6acb1

Please sign in to comment.