copyWith method
Returns a copy of this span with updated attributes.
Implementation
Span copyWith({
Map<String, String>? attributes,
DateTime? endTime,
String? parentSpanId,
}) {
return Span(
spanId: spanId,
name: name,
startTime: startTime,
endTime: endTime ?? this.endTime,
duration: duration,
parentSpanId: parentSpanId ?? this.parentSpanId,
traceId: traceId,
attributes: attributes ?? this.attributes,
);
}