InMemorySpanExporter class final

Retains spans in memory.

Backs assertions in tests and powers an in-app trace inspector. maxSpans bounds memory by dropping the oldest spans.

Implemented types

Constructors

InMemorySpanExporter({int maxSpans = 1000})
Creates a bounded in-memory exporter.

Properties

hashCode → int
The hash code for this object.
no setterinherited
maxSpans → int
Maximum number of spans retained.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
spans → List<SpanData>
The exported spans, oldest first.
no setter

Methods

clear() → void
Discards every retained span.
dispose() → Future<void>
Releases every resource held by this object.
override
export(SpanData span) → void
Handles one finished span.
override
named(String name) → List<SpanData>
Every exported span named name.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
trace(String traceId) → List<SpanData>
Every exported span belonging to traceId, in start order.

Operators

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