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
- log level — A label on each log message saying how serious it is, from debug and info up to error, critical and emergency.
- span status — A field on a span recording whether its operation failed (Error) or was explicitly marked as successful (Ok).
Taught in
- Troubleshooting Sprint: Three Tickets, One Morning — CompTIA Cloud+ (CV0-004) Exam Prep
- The Three Signals: Logs, Metrics And Traces — Full-Stack Observability: Metrics, Tracing & Logging
- Structured Logging And Why Text Fails — Full-Stack Observability: Metrics, Tracing & Logging
- Log Levels Done Properly — Full-Stack Observability: Metrics, Tracing & Logging
- Traces, Spans And Context Propagation — Full-Stack Observability: Metrics, Tracing & Logging
- Instrumenting A Service With Client Libraries — Full-Stack Observability: Metrics, Tracing & Logging
- Verbose Logging: TF_LOG And Friends — HashiCorp Terraform Associate (004) Exam Prep
- The Full Mock: Sixty Minutes, Eight Areas, One Plan For The Last Week — HashiCorp Terraform Associate (004) Exam Prep
- The Pager Goes Off At 2 A.M.: A Three-Question Triage — CompTIA Linux+ (XK0-006) Exam Prep
- Friday's Backup, Monday's Restore: Incrementals, Images And Compressed Logs — CompTIA Linux+ (XK0-006) Exam Prep