Records error on the active span and sets an error status carrying message, or the error's own message. Does
nothing when no span is active or while content-safe telemetry is on.
Parameters
error: unknown
The error to record.
Optionalmessage: string
The status message to use instead of the error's message.
Records
erroron the active span and sets an error status carryingmessage, or the error's own message. Does nothing when no span is active or while content-safe telemetry is on.