---
title: oban.job_finished
description: An Oban job finished, whether it succeeded or failed. Emitted for both oban.job.stop and oban.job.exception telemetry events.
url: https://docs.honeybadger.io/insights/event-types/python/oban.job_finished/
---

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](https://docs.honeybadger.io/lib/python/)

## Fields

| 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

```json
{
  "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"
}
```

---

## Try Honeybadger for FREE

Intelligent logging, error tracking, and Just Enough APM™ in one dev-friendly platform. Find and fix problems before users notice.

[Start free trial](https://app.honeybadger.io/users/sign_up)

[See plans and pricing](https://www.honeybadger.io/plans/)
