Class Metrics
- Namespace
- Executables.Analytics
- Assembly
- executables.dll
Factory methods for creating metrics sinks.
public static class Metrics
- Inheritance
-
Metrics
- Inherited Members
Methods
Create<T1, T2>(Action<T1>, Action<T2>, Action<Exception>, Action<TimeSpan>)
Creates a metrics sink from delegates.
[Pure]
public static IMetrics<T1, T2> Create<T1, T2>(Action<T1> call, Action<T2> success, Action<Exception> failure = null, Action<TimeSpan> latency = null)
Parameters
callAction<T1>Callback invoked when execution starts.
successAction<T2>Callback invoked when execution succeeds.
failureAction<Exception>Optional callback invoked when execution fails.
latencyAction<TimeSpan>Optional callback invoked with measured execution latency.
Returns
- IMetrics<T1, T2>
Metrics sink backed by the provided delegates.
Type Parameters
T1T2
Exceptions
- ArgumentNullException
callorsuccessis null.