Signature
True if the exception was recorded successfully.
Parameters
| Parameter | Type | Description |
|---|---|---|
exception | Exception | The exception to record. |
attributes | Dict | None | Additional attributes for the exception event. |
timestamp | int | None | Unix timestamp in nanoseconds. Defaults to current time. |
escaped | bool | Whether the exception escaped the span’s scope. |
Example
Decorators automatically record unhandled exceptions. Use
record_exception() when you catch and handle exceptions but still want them visible in the trace.