exportToMicrometer
fun SharedFlow<ResilientEvent>.exportToMicrometer(registry: MeterRegistry, scope: CoroutineScope = GlobalScope): Job
Exports ResilientEvent telemetry from this SharedFlow to Micrometer metrics.
Each event type is mapped to a named Micrometer Counter. The collection runs in the provided scope as a background coroutine; cancel the returned Job to stop processing.
Return
A Job for the background collection coroutine. Cancel it to stop exporting.
Parameters
registry
The Micrometer MeterRegistry used to register and increment counters.
scope
The CoroutineScope that drives the collection coroutine. Defaults to GlobalScope; prefer passing an explicit scope to control lifecycle.