ERROR

The log level for work that was actually lost: a request failed and the user did not get what they asked for.

In more detail

Using ERROR for expected outcomes, such as a customer typing a bad postcode, slowly empties the word of meaning. Log a failure once, at the boundary that decided what to do about it, rather than at every layer it passes through. OpenTelemetry also uses ERROR as a span status for a failed operation.

Example

{"level": "ERROR", "event": "order_rejected", "reason": "timeout"}

Related terms

Taught in

References

Certification courses