Skip to content

oban.job_finished

View Markdown

An Oban job finished, whether it succeeded or failed. Emitted for both oban.job.stop and oban.job.exception telemetry events.

Source Oban Category Jobs Fields 17 honeybadger-python

Fields

17
FieldTypeDescription
event_typestringAllowed value: oban.job_finished.
job_idintegerOban job database ID.
workerstringFully qualified worker name ("module.Class").
queuestringQueue the job ran on.
statestringResulting job state: "completed", "retryable", "discarded", "cancelled", or "scheduled" (snoozed). Failures are "retryable" until max_attempts is exhausted, then "discarded".
attemptintegerAttempt number (1-based).
max_attemptsintegerMaximum number of attempts before the job is discarded.
durationnumberJob execution duration in milliseconds.
queue_timenumberTime the job spent waiting in the queue (scheduled_at to attempted_at) in milliseconds.
tagsarray<string>Tags assigned to the job.
error_typestringException class name. Only present when the job failed (state "retryable" or "discarded").
error_messagestringException message. Only present when the job failed (state "retryable" or "discarded").
argsobjectJob arguments (filtered). Only present when include_args is enabled in insights_config.
args.*anyAdditional caller-defined keys.
metaobjectJob metadata (filtered). Only present when include_args is enabled in insights_config.
meta.*anyAdditional caller-defined keys.
request_idstringRequest ID propagated from the originating request's event context via Oban job metadata.

Example

{
"event_type": "oban.job_finished",
"job_id": 123456,
"worker": "myapp.workers.WelcomeEmail",
"queue": "default",
"state": "completed",
"attempt": 1,
"max_attempts": 20,
"duration": 845.2103,
"queue_time": 12.5,
"tags": [
"mailer"
],
"error_type": "ValueError",
"error_message": "invalid user id",
"args": {
"user_id": 42
},
"meta": {
"source": "signup"
},
"request_id": "1f9f6f1a-2b3c-4d5e-8f6a-7b8c9d0e1f2a"
}