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

Add support for distributed tracing for DelayedJob #2233

Merged
merged 2 commits into from
Jan 28, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Update sentry-delayed_job/lib/sentry/delayed_job/plugin.rb
Co-authored-by: Stan Lo <[email protected]>
  • Loading branch information
sl0thentr0py and st0012 committed Jan 23, 2024
commit 8485799c736c7509b5111c37f0662df3d720dc4c
10 changes: 4 additions & 6 deletions sentry-delayed_job/lib/sentry/delayed_job/plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,10 @@ def self.extract_trace_data(job)
payload_object = job.payload_object
return nil unless payload_object.is_a?(Delayed::PerformableMethod)

ind = payload_object.args.index { |a| a.is_a?(Hash) && a.key?(:sentry) }
return nil unless ind

env = payload_object.args[ind][:sentry]
payload_object.args.delete_at(ind)
env
target_payload = payload_object.args.find { |a| a.is_a?(Hash) && a.key?(:sentry) }
return nil unless target_payload
payload_object.args.delete(target_payload)
target_payload[:sentry]
end
end
end
Expand Down
Loading