toJson method

Map<String, dynamic> toJson()

Item encoded as JSON

Implementation

Map<String, dynamic> toJson() {
  return {
    'span_id': spanId.toString(),
    'trace_id': traceId.toString(),
    'op': operation,
    if (parentSpanId != null) 'parent_span_id': parentSpanId.toString(),
    if (description != null) 'description': description,
    if (origin != null) 'origin': origin,
  };
}