public static void TrackDuration(this ITelemetry telemetry, string eventName, TimeSpan duration, IPaymentsCommand paymentCommand, long?employerAccountId = null) { var props = new Dictionary <string, string> { { "JobId", paymentCommand.JobId.ToString() }, }; TrackDuration(telemetry, eventName, duration, props, employerAccountId, null); }
public static void TrackDurationWithMetrics(this ITelemetry telemetry, string eventName, Stopwatch stopwatch, IPaymentsCommand paymentCommand, long?employerAccountId = null, Dictionary <string, double> metrics = null) { stopwatch.Stop(); var props = new Dictionary <string, string> { { "JobId", paymentCommand.JobId.ToString() }, }; TrackDuration(telemetry, eventName, stopwatch.Elapsed, props, employerAccountId, null); }
public static void TrackDuration(this ITelemetry telemetry, string eventName, Stopwatch stopwatch, IPaymentsCommand paymentCommand, long?employerAccountId = null) { stopwatch.Stop(); TrackDuration(telemetry, eventName, stopwatch.Elapsed, paymentCommand, employerAccountId); }