Span class abstract

A representation of a single operation within a trace.

Examples of a span might include remote procedure calls or in-process function calls to sub-components. A trace has a single, top-level "root" span that in turn may haze zero or more child Spans, which in turn may have children.

Implementers

Constructors

Span()

Properties

endTime → Int64?
Get the time when the span was closed, or null if still open.
no setter
hashCode int
The hash code for this object.
no setterinherited
instrumentationLibrary InstrumentationLibrary?
Retrieve the instrumentation library on this span.
no setter
isRecording bool
Whether this Span is recording information like events with the addEvent operation, status with setStatus, etc.
no setter
kind SpanKind
The kind of the span.
no setter
name String
The name of the span.
getter/setter pair
parentSpanId SpanId?
The parent span id.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
spanContext SpanContext
The context associated with this span.
no setter
startTime → Int64?
Get the time when the span was started.
no setter
status SpanStatus
Retrieve the status of the Span.
no setter

Methods

addEvent(String name, Int64 timestamp, {List<Attribute> attributes = const []}) → void
Record metadata about an event occurring during this span.
end() → void
Marks the end of this span's execution.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
recordException(dynamic exception, {StackTrace? stackTrace}) → void
Record metadata about an exception occurring during this span.
setAttribute(Attribute attribute) → void
set single attribute
setAttributes(List<Attribute> attributes) → void
set multiple attributes
setStatus(StatusCode status, {String description}) → void
Sets the status to the Span.
toString() String
A string representation of this object.
inherited

Operators

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