recordException static method

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

Record an exception with an optional stack trace and properties.

properties is a plain Dart map (Map<String, Object?>) of additional attributes to attach to the error.

Implementation

static void recordException(
  dynamic exception, {
  StackTrace? stackTrace,
  Map<String, Object?>? properties,
}) => ObserveOtel.recordException(
  exception,
  stackTrace: stackTrace,
  attributes: attributesFromProperties(properties),
);