# `Tlm.Oban`

Reports Oban job failures. Attached on its own when Oban is loaded.

Failed attempts are events; they group into one issue, tagged with the
worker, queue, job id, attempt and max attempts, and the job's args.
Jobs that return `{:cancel, _}` or `{:discard, _}` chose to stop, so they aren't reported, and neither is
a job that returned `{:error, _}` while Oban still has attempts left:
a returned error is usually something outside the job that was briefly
away, and the next attempt settles it. The event comes when the
attempts run out. A job that *raises* is reported on every attempt --
that is this code meeting something it could not handle, and one that
disappears on the next attempt is a race worth seeing.

A job that returns `{:error, _}` instead of raising has no stacktrace,
so its event gets one frame: the worker's `perform/1`, with its file,
line and code when they can be found (in a release, from
`mix tlm.package_source`).

## Args

The args a failing job ran with are sent as its `args` tag, so the
issue shows the input that broke it. Values under keys that look
secret (`password`, `token`, `secret`, `api_key`, `key`, `auth`,
`cookie`, `session`, `dsn`, `credential`, `private` and the like, in
any case, at any depth) are sent as `"[FILTERED]"`. Past 2 KB of JSON,
the args are sent as their first 2 KB of JSON, ending in `…[cut]`.

For apps whose job args are sensitive by nature, leave them out:

    config :tlm, oban: [args: false]

# `attach`

Starts reporting job failures to `sender`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
