observability library

Optional observability integrations for Stem.

This library is intentionally separate from package:stem/stem.dart. Logging is exposed through Stem-owned configuration types; the underlying logging package remains an implementation detail.

Classes

ConsoleMetricsExporter
Simple exporter that prints JSON metrics to either sink or stdout.
DartasticMetricsExporter
Metrics exporter that relays events through Dartastic's OTLP pipeline.
DlqEntrySnapshot
Represents a single entry captured in the dead-letter queue.
HeartbeatTransport
Transport abstraction for distributing worker heartbeat payloads.
MetricEvent
Immutable metric event emitted to exporters.
MetricsExporter
Consumers implement exporters to relay metric events to specific sinks.
NoopHeartbeatTransport
Transport that intentionally drops all heartbeats.
ObservabilityConfig
Aggregates configuration controlling observability integrations.
ObservabilityReport
Aggregated observability information for queues, workers, and DLQ entries.
PrometheusMetricsExporter
Exporter that accumulates metrics into Prometheus exposition format.
QueueHeartbeat
Aggregated in-flight counts for a specific queue.
QueueSnapshot
Point-in-time metrics describing a specific queue.
StemLogger
Dependency-neutral facade for emitting Stem log messages.
StemMetrics
Central registry that aggregates metrics before exporting them.
StemTracer
Utilities for Stem's tracing integration (Dartastic OpenTelemetry).
WorkerHeartbeat
Structured payload describing worker state for external monitoring systems.
WorkerSnapshot
Captures details about a worker instance at the sample instant.

Enums

MetricType
Known metric aggregation types supported by the exporters.
StemLogFormat
Output format used by Stem's built-in logging configuration.
StemLogLevel
Log severity understood by Stem's logging facade.

Properties

stemLogger StemLogger
The shared Stem logger facade.
final

Functions

configureStemLogging({StemLogLevel level = StemLogLevel.info, StemLogFormat format = StemLogFormat.pretty, bool enableConsole = true}) → void
Configures Stem's built-in logger without exposing its logging dependency.