TelemetryMesh class

Global telemetry coordinator for zuraffa.

TelemetryMesh is a singleton that manages trace collection, span creation, and exporter dispatch. When disabled (the default), every operation is a no-op with zero allocation overhead.

Properties

hashCode → int
The hash code for this object.
no setterinherited
isEnabled → bool
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sampleRate → double
no setter

Methods

disable() → void
Disable telemetry. All active traces are flushed and cleared.
enable({required List<TelemetryExporter> exporters, double sampleRate = 1.0}) → void
Enable telemetry with the given exporters and sample rate.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
startSpan(String name, {String? operation, Map<String, dynamic>? attributes}) → ZuraffaSpan
Start a new span under the current trace.
toString() → String
A string representation of this object.
inherited
trace<T>(String name, T body(), {String? operation, Map<String, dynamic>? attributes}) → T
Execute body inside a traced span.
traceAsync<T>(String name, Future<T> body(), {String? operation, Map<String, dynamic>? attributes}) → Future<T>
Async variant of trace.
traceNetwork<T>(String endpoint, T body()) → T
Trace a network request.
traceNetworkAsync<T>(String endpoint, Future<T> body()) → Future<T>
traceRepository<T>(String repoName, String method, T body()) → T
Trace a repository call.
traceRepositoryAsync<T>(String repoName, String method, Future<T> body()) → Future<T>
traceUseCase<T>(String useCaseName, T body()) → T
Trace a UseCase execution under the span name usecase.<useCaseName>.
traceUseCaseAsync<T>(String useCaseName, Future<T> body()) → Future<T>

Operators

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

Static Properties

instance → TelemetryMesh
final