Span constructor

Span({
  1. List<int>? traceId,
  2. List<int>? spanId,
  3. String? traceState,
  4. List<int>? parentSpanId,
  5. String? name,
  6. Span_SpanKind? kind,
  7. Int64? startTimeUnixNano,
  8. Int64? endTimeUnixNano,
  9. Iterable<KeyValue>? attributes,
  10. int? droppedAttributesCount,
  11. Iterable<Span_Event>? events,
  12. int? droppedEventsCount,
  13. Iterable<Span_Link>? links,
  14. int? droppedLinksCount,
  15. Status? status,
  16. int? flags,
})

Implementation

factory Span({
  $core.List<$core.int>? traceId,
  $core.List<$core.int>? spanId,
  $core.String? traceState,
  $core.List<$core.int>? parentSpanId,
  $core.String? name,
  Span_SpanKind? kind,
  $fixnum.Int64? startTimeUnixNano,
  $fixnum.Int64? endTimeUnixNano,
  $core.Iterable<$1.KeyValue>? attributes,
  $core.int? droppedAttributesCount,
  $core.Iterable<Span_Event>? events,
  $core.int? droppedEventsCount,
  $core.Iterable<Span_Link>? links,
  $core.int? droppedLinksCount,
  Status? status,
  $core.int? flags,
}) {
  final $result = create();
  if (traceId != null) {
    $result.traceId = traceId;
  }
  if (spanId != null) {
    $result.spanId = spanId;
  }
  if (traceState != null) {
    $result.traceState = traceState;
  }
  if (parentSpanId != null) {
    $result.parentSpanId = parentSpanId;
  }
  if (name != null) {
    $result.name = name;
  }
  if (kind != null) {
    $result.kind = kind;
  }
  if (startTimeUnixNano != null) {
    $result.startTimeUnixNano = startTimeUnixNano;
  }
  if (endTimeUnixNano != null) {
    $result.endTimeUnixNano = endTimeUnixNano;
  }
  if (attributes != null) {
    $result.attributes.addAll(attributes);
  }
  if (droppedAttributesCount != null) {
    $result.droppedAttributesCount = droppedAttributesCount;
  }
  if (events != null) {
    $result.events.addAll(events);
  }
  if (droppedEventsCount != null) {
    $result.droppedEventsCount = droppedEventsCount;
  }
  if (links != null) {
    $result.links.addAll(links);
  }
  if (droppedLinksCount != null) {
    $result.droppedLinksCount = droppedLinksCount;
  }
  if (status != null) {
    $result.status = status;
  }
  if (flags != null) {
    $result.flags = flags;
  }
  return $result;
}