copyWith method

Trace copyWith({
  1. Map<String, String>? attributes,
  2. DateTime? endTime,
})

Returns a copy of this trace with updated attributes.

Implementation

Trace copyWith({
  Map<String, String>? attributes,
  DateTime? endTime,
}) {
  return Trace(
    traceId: traceId,
    name: name,
    startTime: startTime,
    endTime: endTime ?? this.endTime,
    attributes: attributes ?? this.attributes,
  );
}