public static void SetCommitPollingClientBufferSize(String pollerName, Func <double> valueProvider) { String gaugeName; if (!String.IsNullOrEmpty(pollerName)) { gaugeName = _commitPollingClientBufferSizeGaugeName + "-" + pollerName; } else { gaugeName = _commitPollingClientBufferSizeGaugeName; } if (TenantContext.CurrentTenantId != null) { gaugeName = "t[" + TenantContext.CurrentTenantId + "]" + gaugeName; } MetricsHelper.CreateGauge(gaugeName, valueProvider, Unit.Items); }
public static void SetCheckpointCountToDispatch(String slotName, Func <double> valueProvider) { //These stats are valid only during a rebuild and not during standard working. if (!RebuildSettings.ShouldRebuild) { return; } String gaugeName; if (!String.IsNullOrEmpty(slotName)) { gaugeName = _checkpointToDispatchRebuildGaugeName + "-" + slotName; } else { gaugeName = _checkpointToDispatchRebuildGaugeName; } if (TenantContext.CurrentTenantId != null) { gaugeName = "t[" + TenantContext.CurrentTenantId + "]" + gaugeName; } MetricsHelper.CreateGauge(gaugeName, valueProvider, Unit.Items); }
public static void SetProjectionEngineCurrentDispatchCount(Func <double> valueProvider) { MetricsHelper.CreateGauge(_projectionEngineCurrentDispatchCount, valueProvider, Unit.Custom(EventStoreFactory.PartitionCollectionName)); }