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

Active Job w/ Delayed Job Backend #378

Merged
merged 1 commit into from
Oct 20, 2015
Merged

Active Job w/ Delayed Job Backend #378

merged 1 commit into from
Oct 20, 2015

Conversation

kkumler
Copy link
Contributor

@kkumler kkumler commented Oct 15, 2015

When an exception is caught from delayed job, but was sent via the Active Job backend, other information is available to fetch.

There were situations where only last_error, locked_at, and queue were in the additional data. Depending on point of failure, some of the active_job data may have been included.
This adds the active_job data, which may include arguments, job_class, the Active Job job_id, locale, and queue_name. The Active Job job_id is most useful, as it is included in the default tagged logging.

@nateberkopec
Copy link
Contributor

Won't this remove data for DelayedJob users without ActiveJob?

@kkumler
Copy link
Contributor Author

kkumler commented Oct 16, 2015

The previous delayed_job hash is still there, at the same level of the extra data sent to Sentry.
An example of the extra data sent (as pulled from the json sent to Sentry):

"extra": {
    "active_job": {
        "arguments": [
            {
                "_aj_globalid": "gid://appname/Instance/27"
            }
        ],
        "job_class": "FailingJob",
        "job_id": "4e74c7ac-b309-470a-b6c4-6778642364d6",
        "locale": "en",
        "queue_name": "default"
    },
    "delayed_job": {
        "locked_at": "Thu, 15 Oct 2015 22:56:34 UTC +00:00",
        "queue": "default"
    }
}

@kkumler
Copy link
Contributor Author

kkumler commented Oct 20, 2015

Rebased from current master, which included the Ruby 1.8.7 test fix.

nateberkopec added a commit that referenced this pull request Oct 20, 2015
Active Job w/ Delayed Job Backend
@nateberkopec nateberkopec merged commit 315fa2e into getsentry:master Oct 20, 2015
@kkumler kkumler deleted the delayed_job_backend branch December 9, 2015 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants