recordException

open fun recordException(exception: Throwable): Boolean

Record the given Throwable as a Span Event at the current time. Returns false if event was definitely not recorded. Returns true if the validation at the Embrace level has passed and the call to add the Event at the OpenTelemetry level was successful.


abstract fun recordException(exception: Throwable, attributes: Map<String, String>?): Boolean

Record the given Throwable as a Span Event at the current with the given set of Attributes. Returns false if event was definitely not recorded. Returns true if the validation at the Embrace level has passed and the call to add the Event at the OpenTelemetry level was successful.