Span constructor

Span({
  1. required String name,
  2. required TraceContext context,
  3. String? parentSpanId,
  4. DateTime? startedAt,
  5. Map<String, Object?>? attributes,
})

Starts a span named name in context.

Implementation

Span({
  required this.name,
  required this.context,
  this.parentSpanId,
  DateTime? startedAt,
  Map<String, Object?>? attributes,
})  : startedAt = startedAt ?? DateTime.now().toUtc(),
      attributes = attributes ?? <String, Object?>{};