Span class

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 might be gaps or overlaps between spans in a trace.

Constructors

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_)

Properties

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

Methods

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

Operators

operator ==(Object other) bool
The equality operator.
inherited