MetricCommandHandler

Metric decorator for command handlers that collects metrics on command processing operations. This class wraps a CommandHandler and adds metrics collection with tags for aggregate name and command name to track command handling performance and success rates.

Constructors

Link copied to clipboard
constructor(delegate: CommandHandler)

Properties

Link copied to clipboard
open override val delegate: CommandHandler

the underlying command handler implementation

Functions

Link copied to clipboard
open override fun handle(exchange: ServerCommandExchange<*>): Mono<Void>

Handles a server command exchange and collects metrics on the operation. Metrics collected include timing, success/failure rates, and tags for aggregate and command identification.

Link copied to clipboard

Wraps a CommandHandler with metrics collection capabilities. Returns a MetricCommandHandler that collects metrics on command handling operations.