oban.job_finished
An Oban job finished, whether it succeeded or failed. Emitted for both oban.job.stop and oban.job.exception telemetry events.
Fields
17| Field | Type | Description |
|---|---|---|
event_type | string | Allowed value: oban.job_finished. |
job_id | integer | Oban job database ID. |
worker | string | Fully qualified worker name ("module.Class"). |
queue | string | Queue the job ran on. |
state | string | Resulting job state: "completed", "retryable", "discarded", "cancelled", or "scheduled" (snoozed). Failures are "retryable" until max_attempts is exhausted, then "discarded". |
attempt | integer | Attempt number (1-based). |
max_attempts | integer | Maximum number of attempts before the job is discarded. |
duration | number | Job execution duration in milliseconds. |
queue_time | number | Time the job spent waiting in the queue (scheduled_at to attempted_at) in milliseconds. |
tags | array<string> | Tags assigned to the job. |
error_type | string | Exception class name. Only present when the job failed (state "retryable" or "discarded"). |
error_message | string | Exception message. Only present when the job failed (state "retryable" or "discarded"). |
args | object | Job arguments (filtered). Only present when include_args is enabled in insights_config. |
args.* | any | Additional caller-defined keys. |
meta | object | Job metadata (filtered). Only present when include_args is enabled in insights_config. |
meta.* | any | Additional caller-defined keys. |
request_id | string | Request 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"}