ExceptionTelemetryItem constructor

ExceptionTelemetryItem({
  1. required Severity severity,
  2. required Object error,
  3. StackTrace? stackTrace,
  4. String? problemId,
  5. Map<String, Object> additionalProperties = const <String, Object>{},
  6. DateTime? timestamp,
})

Creates an instance of ExceptionTelemetryItem with the specified severity and error.

If no problemId is provided, one will be generated based on the error and stackTrace (if any) provided.

Implementation

ExceptionTelemetryItem({
  required this.severity,
  required this.error,
  this.stackTrace,
  this.problemId,
  this.additionalProperties = const <String, Object>{},
  DateTime? timestamp,
})  : assert(timestamp == null || timestamp.isUtc),
      timestamp = timestamp ?? DateTime.now().toUtc();