ChainObservability extension Observability

Events and metrics of an assembled chain: every Chain.submit reports a BlockFinalized or a BlockRejected, and the metrics count them.

on

Properties

eventStream → Stream<ChainEvent>

Available on Chain, provided by the ChainObservability extension

Every event as it happens, on the microtask after the call that caused it. Listening redirects events from the buffer to this broadcast stream until the chain is freed, which closes it.
no setter

Methods

events() → List<ChainEvent>

Available on Chain, provided by the ChainObservability extension

Events buffered since the last call. Empty while eventStream is live.
metrics() → String

Available on Chain, provided by the ChainObservability extension

A Prometheus format metrics snapshot: chain height, blocks finalized and rejected, transactions applied.
metricValues() → Map<String, double>

Available on Chain, provided by the ChainObservability extension

metrics as values keyed by sample name.