asContext property

Map<String, String>? get asContext

Gets the correlation ID as a map entry for easy inclusion in context maps.

Implementation

static Map<String, String>? get asContext {
  final id = current;
  return id != null ? {'correlationId': id} : null;
}