异常¶
Status: Experimental
This document defines how to record exceptions and their required attributes.
Recording an Exception¶
An exception SHOULD be recorded as an Event
on the span during which it
occurred. The name of the event MUST be "exception"
.
A typical template for an auto-instrumentation implementing this semantic
convention using an
API-provided recordException
method could look like
this (pseudo-Java):
Attributes¶
An event representing an exception MUST have an event name exception
.
Additionally, the following attributes SHOULD be filled out:
exception.escaped
exception.message
exception.stacktrace
exception.type
The format and semantics of these attributes are defined in semantic conventions.