LogSpan class

A completed operation span with duration.

Implemented types

Constructors

LogSpan({required String spanId, required String scope, required String name, required DateTime startTime, required DateTime endTime, required SpanStatus status, String? parentSpanId, String? traceId, Object? error, StackTrace? stackTrace, Map<String, Object>? data, List<LogEvent> events = const []})
Creates a LogSpan record.
LogSpan.fromJson(Map<String, dynamic> json)
Deserializes a LogSpan from a JSON-compatible map.
factory

Properties

data Map<String, Object>?
Structured metadata.
final
duration Duration
How long the operation took.
no setter
endTime DateTime
When the span ended.
final
error Object?
Error (if status == error).
final
events List<LogEvent>
Events that occurred inside this span.
final
hashCode int
The hash code for this object.
no setterinherited
name String
Operation name.
final
parentSpanId String?
Parent span ID (for nested spans).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scope String
Scope name (e.g. 'rpc.transport.router').
final
spanId String
Unique span identifier.
final
stackTrace StackTrace?
Stack trace (if status == error).
final
startTime DateTime
When the span started.
final
status SpanStatus
Outcome of the operation.
final
timestamp DateTime
When this record was created.
final
traceId String?
Trace ID for distributed tracing.
final

Methods

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

Operators

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