EventBusMetrics class

Metric collection for one bus.

It is created lazily: while observability is off, EventBus never touches it on the hot path. snapshot is always safe to call and returns an empty view when nothing was collected.

The public record... methods are called by the bus and by transport and isolate adapters; applications normally only read snapshot and changes.

Constructors

EventBusMetrics(EventBusMixin _bus)

Properties

changes → Stream<EventBusMetricsSnapshot>
Coalesced live snapshots for dashboards. A snapshot is emitted at most once per microtask turn and only while the stream has a listener.
no setter
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

Methods

dispose() → Future<void>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
recordFire(String address, {required bool accepted, required int elapsedMicros}) → void
recordOverflow(String? address) → void
Counts a listener buffer overflow reported on address.
recordRequestOutcome(String address, RequestOutcome outcome, int elapsedMicros) → void
recordRequestStarted(String address) → void
snapshot() → EventBusMetricsSnapshot
A consistent, immutable view of the bus.
toString() → String
A string representation of this object.
inherited

Operators

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