LogSpanHandle class
Handle to an active (in-progress) span.
Created by LogScope.startSpan. Must be ended explicitly via end or automatically via LogScope.withSpan.
Constructors
-
LogSpanHandle({required String name, required String scope, required SpanCompleteCallback onComplete, required SpanEventCallback onEvent, required SpanStartCallback onStart, String? parentSpanId, String? traceId, Map<
String, Object> ? data})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isEnded → bool
-
Whether this span has been ended.
no setter
- 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 this span belongs to.
final
- spanId → String
-
Unique span identifier.
final
- traceId → String?
-
Trace ID for distributed tracing.
final
Methods
-
addData(
Map< String, Object> data) → void - Add metadata to the span.
-
end(
{SpanStatus status = SpanStatus.ok, Object? error, StackTrace? stackTrace}) → void - End the span. Emits LogSpan to the pipeline.
-
event(
String message, {RpcLogLevel level = RpcLogLevel.info, Map< String, Object> ? data}) → void - Add an event inside this span.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
startSpan(
String childName, {Map< String, Object> ? data}) → LogSpanHandle - Create a child span (nested operation).
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited