Skip to content

Use :job instead of "job" and prefer "wrapped" over "class"#635

Closed
vindvaki wants to merge 1 commit intogetsentry:masterfrom
vindvaki:master
Closed

Use :job instead of "job" and prefer "wrapped" over "class"#635
vindvaki wants to merge 1 commit intogetsentry:masterfrom
vindvaki:master

Conversation

@vindvaki
Copy link
Copy Markdown

I took a stab at https://github.com/getsentry/raven-ruby/issues/630 myself and noticed that "job" key should have been :job, which explains why we were getting the culprit

Sidekiq

(implying classname == nil) instead of the value of context[:job]["class"], which is

ActiveJob::QueueAdapters::SidekiqAdapter::JobWrapper

for wrapped jobs.

@vindvaki
Copy link
Copy Markdown
Author

@nateberkopec
Copy link
Copy Markdown
Contributor

Sigh, this is actually #622. The context hash may be symbols or strings.

I'm wondering if I should just leave this for 3.0, when the event hash will always be string-keyed.

@vindvaki
Copy link
Copy Markdown
Author

vindvaki commented Mar 3, 2017

Fair enough. Just remember that there are two things going on here:

  1. wrapped vs class
  2. symbol keys vs string keys

The former issue remains regardless of the latter, but there's already an issue open for that in #630. And TBH I don't even know if this PR would break other people's code 😝, so feel free to close it.

@nateberkopec nateberkopec mentioned this pull request Mar 22, 2017
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants