MetricDomainEventHandler
class MetricDomainEventHandler(val delegate: DomainEventHandler) : DomainEventHandler, Decorator<DomainEventHandler>
Metric decorator for domain event handlers that collects metrics on domain event processing operations. This class wraps a DomainEventHandler and adds metrics collection with tags for aggregate name, event name, and processor name to track event handling performance and success rates.
Functions
Link copied to clipboard
Handles a domain event exchange and collects metrics on the operation. Metrics collected include timing, success/failure rates, and tags for aggregate, event, and processor identification.
Link copied to clipboard
Wraps a DomainEventHandler with metrics collection capabilities. Returns a MetricDomainEventHandler that collects metrics on domain event handling operations.