MetricCommandHandler
class MetricCommandHandler(val delegate: CommandHandler) : CommandHandler, Decorator<CommandHandler>
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.
Functions
Link copied to clipboard
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.