private void CheckRequiredParameters(out string serviceUrl, out string apiKey) { serviceUrl = SysSettings.GetValue(_userConnection, EmailMiningConsts.TextParsingServiceSysSetting, string.Empty); if (serviceUrl.IsNullOrEmpty()) { _metricReporter.Gauge(EmailMiningUnreachableMetricName, 1); throw new IncorrectConfigurationException(EmailMiningConsts.TextParsingServiceSysSetting); } apiKey = BpmonlineCloudEngine.GetAPIKey(_userConnection); if (apiKey.IsNullOrEmpty()) { _metricReporter.Gauge(EmailMiningUnreachableMetricName, 1); throw new IncorrectConfigurationException(CloudServicesAPIKey); } }
private void PublishEmailEnrichmentMetrics(Entity activity) { var startDate = activity.GetTypedColumnValue <DateTime>("CreatedOn"); var now = _userConnection.CurrentUser.GetCurrentDateTime(); var miningDurationSec = now.Subtract(startDate).TotalSeconds; _metricReporter.Gauge(EmailMiningTimeMetricName, miningDurationSec); }
/// <inheritdoc cref="IDeduplicationManager.FindDuplicates"/> public DuplicatesCollection FindDuplicates(FindDuplicatesRequest findDuplicatesOnSaveRequest) { var timer = new Stopwatch(); try { timer.Start(); var entityRules = _duplicatesRuleManager .GetDuplicatesRules(findDuplicatesOnSaveRequest.SchemaName); return(FindSimilarRecords(entityRules.ToList(), findDuplicatesOnSaveRequest)); } finally { timer.Stop(); _metricReporter.Gauge(DuplicationSearchDurationMetricName, timer.ElapsedMilliseconds); } }
private void SendErrorMetric() { _metricReporter.Gauge(FullPipelineErrorMetricName, 1); }