SUCCESS, FAILURE, or UNKNOWN) and infers it automatically from the HTTP status code or a captured exception. For custom or non-HTTP work such as background jobs, queue consumers, database, or RPC calls, set the outcome explicitly. An explicitly set outcome takes precedence over the automatic inference; if set more than once, the last value wins.
setOutcome returns the same object, so calls can be chained.