Skip to main content
Structured attributes for an unknown thrown value: its type, sanitized message, code/status when present, and one level of cause. Enough to debug from a log line or span without leaking PII or dumping a raw Error (which stringifies to “[object Object]” inside an attrs object). The stack is intentionally omitted — pass the Error as the logger’s 3rd argument (or wrap with withSpan) so it lands on the OTLP record’s exception.* fields.

Parameters

unknown
required
string

Returns

LogAttrs$1