Span class Null safety

A span represents a single operation within a trace.

Spans can be nested to form a trace tree. Often, a trace contains a root span that describes the end-to-end latency, and one or more subspans for its sub-operations. A trace can also contain multiple root spans, or none at all. Spans do not need to be contiguous—there may be gaps or overlaps between spans in a trace.


Span({Attributes? attributes, int? childSpanCount, TruncatableString? displayName, String? endTime, Links? links, String? name, String? parentSpanId, bool? sameProcessAsParentSpan, String? spanId, String? spanKind, StackTrace? stackTrace, String? startTime, Status? status, TimeEvents? timeEvents})
Span.fromJson(Map _json)


attributes Attributes?
A set of attributes on the span. [...]
read / write
childSpanCount int?
The number of child spans that were generated while this span was active. [...]
read / write
displayName TruncatableString?
A description of the span's operation (up to 128 bytes). [...]
read / write
endTime String?
The end time of the span. [...]
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
Links associated with the span. [...]
read / write
name String?
The resource name of the span in the following format: projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/SPAN_ID is a unique identifier for a trace within a project; it is a 32-character hexadecimal encoding of a 16-byte array. [...]
read / write
parentSpanId String?
The [SPAN_ID] of this span's parent span. [...]
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
sameProcessAsParentSpan bool?
Set this parameter to indicate whether this span is in the same process as its parent. [...]
read / write
spanId String?
The [SPAN_ID] portion of the span's resource name. [...]
read / write
spanKind String?
Distinguishes between spans generated in a particular context. [...]
read / write
stackTrace StackTrace?
Stack trace captured at the start of the span.
read / write
startTime String?
The start time of the span. [...]
read / write
status Status?
The final status for this span. [...]
read / write
timeEvents TimeEvents?
A set of time events. [...]
read / write


noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
toJson() Map<String, dynamic>
toString() String
A string representation of this object. [...]


operator ==(Object other) bool
The equality operator. [...]