recordError method

void recordError(
  1. String code, {
  2. String? errorType,
  3. String? actionId,
  4. String? requestId,
  5. Map<String, Object?> attributes = const {},
})

Records a safe error code/type, never exception messages or stack contents.

Implementation

void recordError(
  String code, {
  String? errorType,
  String? actionId,
  String? requestId,
  Map<String, Object?> attributes = const {},
}) {
  record('error', code, {
    ...Map.fromEntries(attributes.entries.take(26)),
    'errorType': ?errorType,
    'actionId': ?actionId,
    'requestId': ?requestId,
  });
}