Interface IMediatorMetrics
- Namespace
- SimpleMediator
- Assembly
- SimpleMediator.dll
Defines the metrics exposed by SimpleMediator.
public interface IMediatorMetrics
Remarks
Can be customized to integrate with other observability systems (Application Insights, Prometheus, and so on). The default implementation uses Meter.
Methods
TrackFailure(string, string, TimeSpan, string)
Records a failed request execution, either functional or exceptional.
void TrackFailure(string requestKind, string requestName, TimeSpan duration, string reason)
Parameters
requestKindstringLogical request kind.
requestNamestringFriendly name for the request.
durationTimeSpanElapsed time before the failure.
reasonstringCode or description of the failure reason.
TrackSuccess(string, string, TimeSpan)
Records a successful request execution.
void TrackSuccess(string requestKind, string requestName, TimeSpan duration)