MetricEventStore
Metric decorator for event stores that collects metrics on event storage and retrieval operations. This class wraps an EventStore implementation and adds metrics collection with tags for aggregate name and source identification to track event store performance.
Properties
Functions
Appends a domain event stream to the event store and collects metrics on the operation. Metrics collected include timing, success/failure rates, and tags for aggregate identification.
Checks whether the request ID already exists for the specified aggregate.
Loads the last domain event stream for the specified aggregate.
Loads domain event streams for the specified aggregate ID within the given version range and collects metrics on the operation. Metrics collected include timing and tags for aggregate identification.
Loads domain event streams for the specified aggregate ID within the given time range and collects metrics on the operation. Metrics collected include timing and tags for aggregate identification.
Wraps an EventStore with metrics collection capabilities. Returns a MetricEventStore that collects metrics on event storage operations.
Scans for aggregate IDs within the specified named aggregate, starting after the given ID. Returns a limited number of aggregate IDs in lexicographical order.
Loads a single domain event stream for the specified aggregate at the given version.
Extension function to tag a Flux publisher with the current source identifier. This adds the source tag to metrics collected from this reactive stream.
Extension function to tag a Mono publisher with the current source identifier. This adds the source tag to metrics collected from this reactive stream.