Skip to content

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants