recordException method

void recordException(
  1. dynamic exception, {
  2. StackTrace stackTrace = StackTrace.empty,
  3. Map<String, Object?>? attributes,
})

Record information about an exception that happened during this span.

Implementation

void recordException(
  dynamic exception, {
  StackTrace stackTrace = StackTrace.empty,
  Map<String, Object?>? attributes,
}) {
  // The otel library supports an "escaped" attribute, but attribute is
  // deprecated and no longer recommended, so we aren't exporting it.
  _innerSpan.recordException(
    exception,
    stackTrace: stackTrace,
    attributes: convertAttributes(attributesFromProperties(attributes)),
  );
}