addBreadcrumb method

Future<void> addBreadcrumb(
  1. Breadcrumb crumb, {
  2. Hint? hint,
})

Adds a breacrumb to the current Scope

Implementation

Future<void> addBreadcrumb(Breadcrumb crumb, {Hint? hint}) async {
  if (!_isEnabled) {
    _options.logger(
      SentryLevel.warning,
      "Instance is disabled and this 'addBreadcrumb' call is a no-op.",
    );
  } else {
    final item = _peek();
    await item.scope.addBreadcrumb(crumb, hint: hint);
  }
}