NonRecordingSpan class

A class representing a api.Span which should not be sampled or recorded.

See for more information.

This class should not be exposed to consumers and is used internally to wrap api.SpanContext being injected or extracted for external calls.

Implemented types


NonRecordingSpan(SpanContext _spanContext)


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


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.
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.


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