NonRecordingSpan class

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

See https://github.com/open-telemetry/videosdk_otel-specification/blob/main/specification/trace/api.md#wrapping-a-spancontext-in-a-span 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

Constructors

NonRecordingSpan(SpanContext _spanContext)

Properties

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

Methods

addEvent(String name, Int64 timestamp, {List<Attribute> attributes = const []}) → void
Record metadata about an event occurring during this span.
override
end() → void
Marks the end of this span's execution.
override
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.
override
setAttribute(Attribute attribute) → void
set single attribute
override
setAttributes(List<Attribute> attributes) → void
set multiple attributes
override
setStatus(StatusCode status, {String description = ''}) → void
Sets the status to the Span.
override
toString() → String
A string representation of this object.
inherited

Operators

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