Handling errors
When an operation throws an exception, a span must log the ERROR status and the exception event with the error details. Spans with the ERROR status are highlighted in the Monium Traces interface and can be filtered.
For information about the basic error handling pattern, see Statuses and errors. This page describes the exception event attributes based on the OpenTelemetry specification
Exception event attributes
For example, in Python, calling record_exception creates an exception event with the following attributes:
|
Attribute |
Description |
|
|
Exception type: |
|
|
Error message: |
|
|
Exception stack trace |
For a full list of attributes, see the OpenTelemetry specification for exception events
Example
The parse_message operation fails with an error:
|
Attribute |
Value |
|
Name |
|
|
Kind |
|
|
Status |
|
|
|
|
|
|
|
|
|
|