SimpleTelemetryService class

Simplified telemetry service for ODBC operations.

Provides methods for starting/ending traces, spans, and recording metrics. Uses a simple ITelemetryRepository that doesn't return Result types.

Implemented types

Constructors

SimpleTelemetryService(ITelemetryRepository _repository)

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
serviceName String
Service name identifier.
no setteroverride

Methods

endSpan({required String spanId, Map<String, String> attributes = const {}}) Future<void>
Finishes a span with optional attributes.
override
endTrace({required String traceId, Map<String, String> attributes = const {}}) Future<void>
Finishes a trace with optional attributes.
override
flush() Future<void>
Flushes all pending telemetry data.
override
inOperation<T>(String operationName, Future<T> fn()) Future<T>
Wraps an async operation with trace lifecycle and timing.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
recordEvent({required String name, required TelemetrySeverity severity, required String message, Map<String, dynamic> context = const {}}) Future<void>
Records a telemetry event (log entry).
override
recordGauge({required String name, required double value, Map<String, String> attributes = const {}}) Future<void>
Records a gauge metric (current value).
override
recordMetric({required String name, required String metricType, required double value, String unit = 'count', Map<String, String> attributes = const {}}) Future<void>
Records a counter metric.
override
recordTiming({required String name, required Duration duration, Map<String, String> attributes = const {}}) Future<void>
Records a timing metric.
override
shutdown() Future<void>
Shutdowns telemetry exporter and releases resources.
override
startSpan({required String parentId, required String spanName, Map<String, String> initialAttributes = const {}}) Span
Creates a child span within a trace.
override
startTrace(String operationName) Trace
Starts a new distributed trace.
override
toString() String
A string representation of this object.
inherited

Operators

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