Package-level declarations

Types

Link copied to clipboard
@Serializable
data class ActionMetrics(val sent: Long, val delivered: Long, val undelivered: Long, val opsPerSecond: Double, val deliveryAvg: Duration, val deliveryP50: Duration, val deliveryP90: Duration, val deliveryP95: Duration, val deliveryP99: Duration, val queueTimeAvg: Duration, val queueTimeMedian: Duration, val bufferMaxOccupancy: Int, val bufferOverflows: Long, val pluginOverheadAvg: Duration, val pluginOverheadMedian: Duration)

Aggregated metrics for actions.

Link copied to clipboard

The default Metrics implementation provided by FlowMVI.

Link copied to clipboard
@Serializable
data class ExceptionMetrics(val total: Long, val handled: Long, val recoveryLatencyAvg: Duration, val recoveryLatencyMedian: Duration)

Exception handling metrics.

Link copied to clipboard
@Serializable
data class IntentMetrics(val total: Long, val processed: Long, val dropped: Long, val undelivered: Long, val opsPerSecond: Double, val durationAvg: Duration, val durationP50: Duration, val durationP90: Duration, val durationP95: Duration, val durationP99: Duration, val queueTimeAvg: Duration, val inFlightMax: Int, val interArrivalAvg: Duration, val interArrivalMedian: Duration, val burstMax: Int, val bufferMaxOccupancy: Int, val bufferOverflows: Long, val pluginOverheadAvg: Duration, val pluginOverheadMedian: Duration)

Aggregated metrics for intents.

Link copied to clipboard
@Serializable
data class LifecycleMetrics(val startCount: Long, val stopCount: Long, val uptimeTotal: Duration, val lifetimeCurrent: Duration, val lifetimeAvg: Duration, val lifetimeMedian: Duration, val bootstrapAvg: Duration, val bootstrapMedian: Duration)

Lifecycle metrics of the store.

Link copied to clipboard
@Serializable
data class Meta(val schemaVersion: MetricsSchemaVersion = MetricsSchemaVersion.CURRENT, val runId: String? = null, val generatedAt: Instant, val startTime: Instant? = null, val storeName: String? = null, val storeId: Uuid?, val windowSeconds: Int, val emaAlpha: Float)

Metadata describing snapshot timing and configuration identity.

Link copied to clipboard
fun interface Metrics

Objects that allows retrieving metrics snapshot.

Link copied to clipboard
@Serializable
data class MetricsSchemaVersion(val major: Int, val minor: Int) : Comparable<MetricsSchemaVersion>

Schema version for metrics payloads and rendered metric surfaces.

Link copied to clipboard
@Serializable
data class MetricsSnapshot(val meta: Meta, val intents: IntentMetrics, val actions: ActionMetrics, val state: StateMetrics, val subscriptions: SubscriptionMetrics, val lifecycle: LifecycleMetrics, val exceptions: ExceptionMetrics, val storeConfiguration: StoreConfiguration<MVIState>? = null)

Root metrics payload composed of typed sections. Serializable for transport; the in-memory store configuration is kept separately and not encoded.

Link copied to clipboard
sealed interface MetricSurface

Metric surface encapsulates the concrete naming/label layout for rendered metrics (the shape of serialized MetricsSnapshot).

Link copied to clipboard
fun interface Sink<T>

A sink, where values such as Metrics can be dumped by code such as the one used by the pro.respawn.flowmvi.metrics.dsl.metricsReporter plugin

Link copied to clipboard
@Serializable
data class StateMetrics(val transitions: Long, val transitionsVetoed: Long, val startedInInitialState: Boolean, val timeToFirstState: Duration?, val updateAvg: Duration, val updateP50: Duration, val updateP90: Duration, val updateP95: Duration, val updateP99: Duration, val opsPerSecond: Double)

Aggregated metrics for state updates.

Link copied to clipboard
@Serializable
data class SubscriptionMetrics(val events: Long, val current: Int, val peak: Int, val lifetimeAvg: Duration, val lifetimeMedian: Duration, val subscribersAvg: Double, val subscribersMedian: Double)

Aggregated metrics for subscriptions.

Functions

Link copied to clipboard

Returns a snapshot adjusted for the target schema version.