/// <inheritdoc /> public virtual Task InitializeAsync(ILogger logger, IMetricFactory metricFactory, ProcessorPartitionContext partitionContext) { Logger = logger; using (Logger.BeginScope("Initialize batch processor")) { Logger.LogInformation("Initializing batch processor for partition {partitionId}", partitionContext.PartitionId); MessageCounter = metricFactory.CreateCounter($"hcp-message-count-{partitionContext.PartitionId}", "The number of messages that have been processed by partition {partitionContext.PartitionId}", false, new string[0]); ErrorCounter = metricFactory.CreateCounter($"hcp-error-count-{partitionContext.PartitionId}", "The number of errors that have been processed by partition {partitionContext.PartitionId}", false, new string[0]); } return(Task.CompletedTask); }
public MetricsCollector(IMetricFactory metricFactory) { _totalRequests = metricFactory.CreateCounter( "dolittle_system_runtime_services_reverse_call_requests_total", "ReverseCallDispatcher total requests"); _totalFailedRequests = metricFactory.CreateCounter( "dolittle_system_runtime_services_reverse_call_failed_requests_total", "ReverseCallDispatcher total failed requests"); _totalRequestTime = metricFactory.CreateCounter( "dolittle_system_runtime_services_reverse_call_requests_seconds_total", "ReverseCallDispatcher total time spent writing request and waiting for response"); }
public MetricsCollector(IMetricFactory metricFactory) { _totalCallbacksRegistered = metricFactory.CreateCounter( "dolittle_system_runtime_services_callbacks_registered_total", "Callbacks total number of registered callbacks"); _totalCallbacksCalled = metricFactory.CreateCounter( "dolittle_system_runtime_services_callbacks_calls_total", "Callbacks total number of called callbacks"); _totalCallbackTime = metricFactory.CreateCounter( "dolittle_system_runtime_services_callbacks_time_seconds_total", "Callbacks total time spent calling callbacks"); _totalCallbacksFailed = metricFactory.CreateCounter( "dolittle_system_runtime_services_callbacks_failed_calls_total", "Callbacks total number of called callbacks that failed"); _totalCallbacksUnregistered = metricFactory.CreateCounter( "dolittle_system_runtime_services_callbacks_unregistered_total", "Callbacks total number of unregistered callbacks"); _totalSchedulesMissed = metricFactory.CreateCounter( "dolittle_system_runtime_services_callbacks_schedules_missed_total", "Callbacks total number of missed callback schedules"); _totalSchedulesMissedTime = metricFactory.CreateCounter( "dolittle_system_runtime_services_callbacks_schedules_missed_time_seconds_total", "Callbacks total time delays for missed callback schedules"); _totalCallbackLoopsFailed = metricFactory.CreateCounter( "dolittle_system_runtime_services_callbacks_failed_call_loops_total", "Callbacks total number of failed callback loops"); }
public ThreadPoolStatsCollector( IMetricFactory metricFactory, ICollectorExceptionHandler errorHandler) : base(errorHandler) { WorkerActiveThreadCount = metricFactory.CreateGauge( "dotnet_thread_pool_active_worker_thread_total", "Total number of active worker threads in the thread pool"); WorkerRetiredThreadCount = metricFactory.CreateGauge( "dotnet_thread_pool_retired_worker_thread_total", "Total number of retired worker threads in the thread pool"); ThreadPoolWorkerThreadAdjustmentThroughput = metricFactory.CreateGauge( "dotnet_thread_pool_worker_thread_adjustment_throughput", "Refers to the collection of information for one sample; that is, a measurement of throughput with a certain concurrency level, in an instant of time."); WorkerThreadPoolAdjustmentReasonCount = metricFactory.CreateCounter( "dotnet_thread_pool_worker_thread_adjustment_reason", "Records a change in control, when the thread injection (hill-climbing) algorithm determines that a change in concurrency level is in place.", false, "reason"); IoThreadCount = metricFactory.CreateGauge( "dotnet_thread_pool_io_thread_total", "Number of I/O threads in the thread pool, including this one"); IoRetiredCount = metricFactory.CreateGauge( "dotnet_thread_pool_retired_io_thread_total", "Number of retired I/O threads."); }
public MetricsCollector(IMetricFactory metricFactory) { _totalIncomingSubscriptions = metricFactory.CreateCounter( "dolittle_shared_runtime_event_horizon_producer_incoming_subscriptions_total", "ConsumerService total number of subscription received from other Runtimes"); _totalRejectedSubscriptions = metricFactory.CreateCounter( "dolittle_shared_runtime_event_horizon_producer_rejected_subscriptions_total", "ConsumerService total number of rejected subscriptions"); _totalAcceptedSubscriptions = metricFactory.CreateCounter( "dolittle_shared_runtime_event_horizon_producer_accepted_subscriptions_total", "ConsumerService total number of accepted subscriptions"); _totalEventsWrittenToEventHorizon = metricFactory.CreateCounter( "dolittle_shared_runtime_event_horizon_producer_events_written_total", "ConsumerService total number of events written to event horizon"); }
public MetricsCollector(IMetricFactory metricFactory) { _totalSubscriptionRequests = metricFactory.CreateCounter( "dolittle_shared_runtime_event_horizon_consumer_subscription_requests_total", "SubscriptionsService total number of subscription requests received from Head"); _totalRegisteredSubscriptions = metricFactory.CreateCounter( "dolittle_shared_runtime_event_horizon_consumer_registered_subscriptions_total", "Subscriptions total number of registered subscriptions"); _currentConnectedSubscriptions = metricFactory.CreateGauge( "dolittle_shared_runtime_event_horizon_consumer_connected_subscriptions_current", "Subscription total number of connected subscriptions"); _totalSubscriptionRequestsWhereAlreadyStarted = metricFactory.CreateCounter( "dolittle_shared_runtime_event_horizon_consumer_subscription_already_started_total", "Subscriptions total number of subscription requests made where subscription was already started"); _totalSubscriptionsWithMissingProducerMicroserviceAddress = metricFactory.CreateCounter( "dolittle_shared_runtime_event_horizon_consumer_subscription_with_missing_producer_microservice_address_total", "Subscriptions total number of subscriptions where producer microservice address configuration was missing"); _totalSubscriptionsFailedDueToException = metricFactory.CreateCounter( "dolittle_shared_runtime_event_horizon_consumer_subscription_failed_due_to_exception_total", "Subscriptions total number of subscriptions failed due to an exception"); _totalSubscriptionsFailedDueToReceivingOrWritingEventsCompleted = metricFactory.CreateCounter( "dolittle_shared_runtime_event_horizon_consumer_subscription_failed_due_to_receiving_or_writing_events_completed_total", "Subscriptions total number of subscriptions failed due to receiving or writing events completed"); _totalSubscriptionLoops = metricFactory.CreateCounter( "dolittle_shared_runtime_event_horizon_consumer_subscription_loops_total", "Subscriptions total number of subscriptions loops"); }
/// <summary> /// Configures the basic information associated with the instance, including metrics setup /// </summary> /// <param name="logger">The logger to write debugging and diagnostics information to</param> /// <param name="metricFactory">The metrics factory used to create metrics containers from</param> private void ConfigureInstance(ILogger logger, IMetricFactory metricFactory) { Guard.NotNull(nameof(logger), logger); Guard.NotNull(nameof(metricFactory), metricFactory); Logger = logger; MetricFactory = metricFactory; using (logger.BeginScope("Configuring Instance")) { Logger.LogInformation("Beginning Configuring instance"); _testCounter = metricFactory.CreateCounter("bpm-test-count", "The number of times the poisoned message test has beene executed since the start of the instance.", false, new string[0]); _updateCounter = metricFactory.CreateCounter("bpm-update-count", "The number of times the poisoned message store has been updated since the start of the instance.", false, new string[0]); _updateBlobTiming = metricFactory.CreateSummary("bspm-update-timing", "The timing of the calls to the Azure Storage for updating the poisoned message values", 10, false, new string[0]); _readBlobTiming = metricFactory.CreateSummary("bspm-read-timing", "The timing of the calls to the Azure Storage for reading the poisoned message values", 10, false, new string[0]); Logger.LogInformation("Finished Configuring instance"); } }
private void ConfigureInstance(ILogger logger, IMetricFactory metricFactory, FixedProcessorClientOptions options, ILeaseManager leaseManager, ICheckpointManager checkpointManager) { Guard.NotNull(nameof(logger), logger); Guard.NotNull(nameof(leaseManager), leaseManager); Guard.NotNull(nameof(checkpointManager), checkpointManager); Guard.NotNull(nameof(options), options); Guard.NotNull(nameof(metricFactory), metricFactory); _leaseManager = leaseManager; _checkpointManager = checkpointManager; _options = options; _logger = logger; _metricFactory = metricFactory; _errorCounter = _metricFactory.CreateCounter("fpc-processing-error-count", "The number of processing errors raised since the start of the processor.", false, new string[0]); _partitionStopProcessing = _metricFactory.CreateCounter("fpc-partition-stop-count", "The number of processing stop events raised since the start of the processor.", false, new string[0]); _partitionInitializeProcessing = _metricFactory.CreateCounter("fpc-partition-init-count", "The number of processing initialization events raised since the start of the processor.", false, new string[0]); }
/// <summary> /// Initializes a new instance of the type /// </summary> /// <param name="logger">The logger to write debugging and diagnostics information to</param> /// <param name="metricFactory">The factory to create metrics containers from.</param> /// <param name="partitionId">The identifier of the partition that the context represents.</param> /// <param name="readLastEnqueuedEventProperties">A function that can be used to read the last enqueued event properties for the partition.</param> /// <param name="checkpointManager">The checkpoint manager to used to create the checkpoint</param> internal ProcessorPartitionContext(ILogger logger, IMetricFactory metricFactory, string partitionId, LastPropertiesReader readLastEnqueuedEventProperties, ICheckpointManager checkpointManager) : base(partitionId) { _logger = logger; _checkpointManager = checkpointManager; _readLastEnqueuedEventProperties = readLastEnqueuedEventProperties; _checkpointCounter = metricFactory.CreateCounter($"ppc-checkpoint-counter-{partitionId}", $"The number of times that the checkpoint has been called for partition {partitionId}", false, new string[0]); _checkpointTiming = metricFactory.CreateSummary($"ppc-checkpoint-timing-{partitionId}", $"The time taken to perform checkpoints for partition {partitionId}", 10, false, new string[0]); }
public ExceptionStatsCollector( IMetricFactory metricFactory, ICollectorExceptionHandler errorHandler) : base(errorHandler) { ExceptionCount = metricFactory.CreateCounter( "dotnet_exceptions_total", "Count of exceptions broken down by type", false, "type"); }
/// <summary> /// Configures the basic information associated with the instance, including metrics setup /// </summary> /// <param name="logger">The logger to write debugging and diagnostics information to</param> /// <param name="metricFactory">The metrics factory used to create metrics containers from</param> private void ConfigureInstance(ILogger logger, IMetricFactory metricFactory) { Guard.NotNull(nameof(logger), logger); Guard.NotNull(nameof(metricFactory), metricFactory); Logger = logger; MetricFactory = metricFactory; using (logger.BeginScope("Configuring Instance")) { Logger.LogInformation("Beginning Configuring instance"); _listCheckpointsCounter = metricFactory.CreateCounter("bscm-list-count", "The number of times the list of checkpoints has been invoked since the start of the instance.", false, new string[0]); _updateCheckpointCounter = metricFactory.CreateCounter("bscm-update-count", "The number of times the update checkpoint has been invoked since the start of the instance.", false, new string[0]); _listBlobTiming = metricFactory.CreateSummary("bscm-list-timing", "The timing of the calls to the Azure Storage for list blob operations", 10, false, new string[0]); UpdateBlobTiming = metricFactory.CreateSummary("bscm-update-timing", "The timing of the calls to the Azure Storage for update blob operations", 10, false, new string[0]); Logger.LogInformation("Finished Configuring instance"); } }
/// <summary> /// Initializes a new instance of the type /// </summary> /// <param name="logger">The logger to write debugging and diagnostics information to</param> /// <param name="metricFactory">The factory to create metric recorders from</param> /// <param name="baseDirectory">The directory that is the root of the epoch store</param> /// <param name="ownershipLookup">An instance that can be used to look up ownership of partitions</param> public FileCheckpointManager(ILogger logger, IMetricFactory metricFactory, IOwnershipLookup ownershipLookup, string baseDirectory) { Guard.NotNull(nameof(ownershipLookup), ownershipLookup); Guard.NotNullOrWhitespace(nameof(baseDirectory), baseDirectory); Guard.NotNull(nameof(logger), logger); Guard.NotNull(nameof(metricFactory), metricFactory); _logger = logger; _ownershipLookup = ownershipLookup; using (_logger.BeginScope("File Checkpoint Manager::ctor")) { _baseDirectory = baseDirectory; _logger.LogInformation("Creating file checkpoint manager at { baseDirectory }", baseDirectory); _checkpointReadCounter = metricFactory.CreateCounter("fcm-checkpoint-read", "The number of times that the file checkpoint manager has read the checkpoint", false, new string[0]); _checkpointUpdateCounter = metricFactory.CreateCounter("fcm-checkpoint-update", "The number of times that the file checkpoint manager has updated the checkpoint", false, new string[0]); _checkpointErrorCounter = metricFactory.CreateCounter("fcm-checkpoint-error", "The number of times that the file checkpoint manager has errors raised", false, new string[0]); } }
/// <summary> /// Initializes a new instance of the type /// </summary> /// <param name="logger">The logger to write debugging and diagnostics information to</param> /// <param name="metricFactory">The factory to create metric recorders from</param> /// <param name="storageAccount">The storage account used to access the Azure BLOB store</param> /// <param name="containerName">The name of the container that the BLOBs are contained in</param> /// <param name="subContainerPrefix">The prefix for the BLOB container</param> public AzureStorageCheckpointManager(ILogger logger, IMetricFactory metricFactory, CloudStorageAccount storageAccount, string containerName, string subContainerPrefix) { Guard.NotNull(nameof(storageAccount), storageAccount); Guard.NotNull(nameof(logger), logger); AzureBlobCommon.ValidContainerName(nameof(containerName), containerName); _logger = logger; using (_logger.BeginScope("Azure Storage Checkpoint Manager::ctor")) { _logger.LogInformation("Creating Azure storage checkpoint manager for container {containerName}", containerName); _containerName = containerName; _subContainerPrefix = (subContainerPrefix != null) ? subContainerPrefix.Trim() : ""; _client = storageAccount.CreateCloudBlobClient(); _checkpointReadCounter = metricFactory.CreateCounter("acm-checkpoint-read", "The number of times that the Azure Storage checkpoint manager has read the checkpoint", false, new string[0]); _checkpointUpdateCounter = metricFactory.CreateCounter("acm-checkpoint-update", "The number of times that the Azure Storage checkpoint manager has updated the checkpoint", false, new string[0]); _checkpointErrorCounter = metricFactory.CreateCounter("acm-checkpoint-error", "The number of times that the Azure Storage checkpoint manager has errors raised", false, new string[0]); _storagePerformanceSummary = metricFactory.CreateSummary("acm-storage-timing", "The duration taken to access Azure Storage to perform checkpoint manager operations", 10, false, new string[0]); } }
/// <inheritdoc /> public virtual Task <bool> InitializeAsync(ILogger logger, IMetricFactory metricFactory, ProcessorPartitionContext context, CancellationToken cancellationToken) { Guard.NotNull(nameof(logger), logger); Guard.NotNull(nameof(metricFactory), metricFactory); Guard.NotNull(nameof(context), context); Logger = logger; using (Logger.BeginScope("Initializing Policy Manager")) { MetricFactory = metricFactory; Context = context; Logger.LogInformation("Initializing policy manager {name}", Name); _checkpointExecutedCounter = MetricFactory.CreateCounter("cpol-execution-count", "Counts the number of times a checkpoint has been performed", false, new string[0]); _checkpointErrorCounter = MetricFactory.CreateCounter("cpol-error-count", "Counts the number of times a checkpoint has generated an error", false, new string[0]); _checkpointRequestedCounter = MetricFactory.CreateCounter("cpol-requested-count", "Counts the number of times a checkpoint has been requested", false, new string[0]); } return(Task.FromResult(true)); }
public MetricsCollector(IMetricFactory metricFactory) { _totalEventHorizonEventsProcessed = metricFactory.CreateCounter( "dolittle_shared_runtime_event_horizon_consumer_events_processed_total", "EventProcessor total number of event horizon events processed"); _totalEventHorizonEventWritesFailed = metricFactory.CreateCounter( "dolittle_shared_runtime_event_horizon_consumer_event_writes_failed_total", "EventProcessor total number of event horizon event writes failed"); _totalEventsFetched = metricFactory.CreateCounter( "dolittle_system_runtime_event_horizon_consumer_events_fetched_total", "EventsFromEventHorizonFetcher total number of event horizon events that has been fetched from stream processors"); _totalStreamProcessorsStarted = metricFactory.CreateCounter( "dolittle_system_runtime_event_horizon_consumer_stream_processors_started_total", "StreamProcessor total number of stream processors started"); _totalStreamProcessorStartAttempts = metricFactory.CreateCounter( "dolittle_system_runtime_event_horizon_consumer_stream_processor_start_attempts_total", "StreamProcessor total number of stream processors attempted started"); }
public GcStatsCollector( IMetricFactory metricFactory, IMemoryCache memoryCache, ICollectorExceptionHandler errorHandler, RuntimeStatCollectorsConfiguration configuration) : base(errorHandler) { _memoryCache = memoryCache; _eventTimer = new EventTimer( memoryCache, GCStart_V1, GCEnd_V1, x => Convert.ToInt64(x.Payload[0]), "gc"); GcReasons = metricFactory.CreateCounter( "dotnet_gc_reason_total", "A tally of all the reasons that lead to garbage collections being run", false, "gc_gen", "gc_reason", "gc_type"); GcDuration = metricFactory.CreateHistogram( "dotnet_gc_duration", "The amount of time spent running garbage collections", false, configuration.HistogramBuckets, "gc_gen", "gc_reason", "gc_type"); GcHeapSizeInBytes = metricFactory.CreateGauge( "dotnet_gc_heap_size_bytes", "The current size of all heaps (only updated after a garbage collection)", false, "gc_gen"); LargeObjectAllocationTypeTrigger = metricFactory.CreateCounter( "dotnet_gc_loh_type_trigger_total", "Objects that triggered Large Object Heap allocation", false, "type_name"); }
public ContentionStatsCollector( IMetricFactory metricFactory, ICollectorExceptionHandler errorHandler) : base(errorHandler) { ContentionSecondsTotal = metricFactory .CreateGauge( "dotnet_contention_seconds_total", "The total amount of time spent contending locks"); ContentionTotal = metricFactory .CreateCounter( "dotnet_contention_total", "The number of locks contended"); }
public MetricsCollector(IMetricFactory metricFactory) { _totalConnectionAttempts = metricFactory.CreateCounter( "dolittle_shared_runtime_event_horizon_consumer_connection_attempts_total", "EventHorizonConnection total number of connection attempts"); _totalConnectionsFailed = metricFactory.CreateCounter( "dolittle_shared_runtime_event_horizon_consumer_failed_connections_total", "EventHorizonConnection total number of failed connections"); _totalSuccessfulResponses = metricFactory.CreateCounter( "dolittle_shared_runtime_event_horizon_consumer_connections_successful_responses_total", "EventHorizonConnection total number of successful connection responses"); _totalFailureResponses = metricFactory.CreateCounter( "dolittle_shared_runtime_event_horizon_consumer_connections_failure_responses_total", "EventHorizonConnection total number of failure connection responses"); _totalEventHorizonEventsHandled = metricFactory.CreateCounter( "dolittle_shared_runtime_event_horizon_consumer_handled_events_total", "EventHorizonConnection total number of event horizon events handled"); _totalEventHorizonEventsFailedHandling = metricFactory.CreateCounter( "dolittle_shared_runtime_event_horizon_consumer_failed_event_handling_total", "EventHorizonConnection total number of event horizon events failed handling"); _totalTimeSpentConnecting = metricFactory.CreateCounter( "dolittle_shared_runtime_event_horizon_consumer_time_spent_connecting_to_event_horizon_total", "EventHorizonConnection total time spent successfully connecting to an event horizon"); _totalSubscriptionsWithMissingArguments = metricFactory.CreateCounter( "dolittle_shared_runtime_event_horizon_consumer_subscriptions_with_missing_arguments_total", "EventHorizonConnection total number of subscriptions failed due to missing request arguments"); _totalSubscriptionsWithMissingConsent = metricFactory.CreateCounter( "dolittle_shared_runtime_event_horizon_consumer_subscriptions_with_missing_consent_total", "EventHorizonConnection total number of subscriptions failed due to missing consent"); }
public ThreadPoolSchedulingStatsCollector( IMetricFactory metricFactory, IMemoryCache memoryCache, ICollectorExceptionHandler errorHandler, RuntimeStatCollectorsConfiguration configuration) : base(errorHandler) { _eventTimer = new EventTimer( memoryCache, EventIdThreadPoolEnqueueWork, EventIdThreadPoolDequeueWork, x => (long)x.Payload[0], "tpoolsched"); ScheduledCount = metricFactory.CreateCounter("dotnet_threadpool_scheduled_total", "The total number of items the thread pool has been instructed to execute"); ScheduleDelay = metricFactory.CreateHistogram( "dotnet_threadpool_scheduling_delay_seconds", "A breakdown of the latency experienced between an item being scheduled for execution on the thread pool and it starting execution.", buckets: configuration.HistogramBuckets); }
/// <summary> /// Initializes a new instance of the type /// </summary> /// <param name="dependencyService">A service that can be used to retrieve dependencies that were injected</param> /// <param name="loggerFactory">A factory that can be used to create loggers</param> /// <param name="metricFactory">A factory that can be used to create metrics</param> /// <param name="webSocketConfiguration">The configuration of the web socket</param> /// <param name="bufferPool">The buffer pool used to retreive arrays</param> public WebSocketHandler(IDependencyService dependencyService, IWebSocketConfiguration webSocketConfiguration, IMetricFactory metricFactory, ILoggerFactory loggerFactory, IBufferPool bufferPool) { Guard.NotNull(nameof(metricFactory), metricFactory); Guard.NotNull(nameof(loggerFactory), loggerFactory); Guard.NotNull(nameof(bufferPool), bufferPool); Guard.NotNull(nameof(webSocketConfiguration), webSocketConfiguration); WebSocketConfiguration = webSocketConfiguration; BufferPool = bufferPool; SessionId = Guid.NewGuid(); MetricFactory = metricFactory; Logger = loggerFactory.CreateLogger($"Session Handler: {SessionId:N}"); DependencyService = dependencyService; _errorCounter = metricFactory.CreateCounter("WebSocket error counter", "Tracks the number of errors that have occurred since the start of the service", false, new string[0]); _serviceSessionGauge = metricFactory.CreateGauge("WebSocket sessions in progress", "Tracks the number of sessions underway", false, new string[0]); _sessionTimes = metricFactory.CreateSummary("WebSocket session iteration times", "Tracks the time taken to execute an iteration in the session", 10, false, new string[0]); _receiveTimes = metricFactory.CreateSummary("WebSocket message receive time", "Tracks the time taken to receive a message", 10, false, new string[0]); }
public WeatherForecastController(ILogger <WeatherForecastController> logger, IMetricFactory metricFactory) { _logger = logger; _counter = metricFactory.CreateCounter("my_counter", "my_test"); }
public MetricsCollector(IMetricFactory metricFactory) { _totalGet = metricFactory.CreateCounter( "dolittle_shared_runtime_projections_store_get_total", "ProjectionStore total number of Get requests"); _totalFailedGet = metricFactory.CreateCounter( "dolittle_shared_runtime_projections_store_get_failed_total", "ProjectionStore total number of Get requests that have failed"); _totalGetAll = metricFactory.CreateCounter( "dolittle_shared_runtime_projections_store_get_all_total", "ProjectionStore total number of GetAll requests"); _totalFailedGetAll = metricFactory.CreateCounter( "dolittle_shared_runtime_projections_store_get_all_failed_total", "ProjectionStore total number of GetAll requests that have failed"); _totalReplaceAttempts = metricFactory.CreateCounter( "dolittle_shared_runtime_projections_persister_replace_total", "ProjectionPersister total number of Replace requests"); _totalCopyStoreReplacements = metricFactory.CreateCounter( "dolittle_shared_runtime_projections_persister_replace_copy_total", "ProjectionPersister total number of Replace in copy stores that succeeded"); _totalFailedCopyStoreReplacements = metricFactory.CreateCounter( "dolittle_shared_runtime_projections_persister_replace_copy_failed_total", "ProjectionPersister total number of Replace in copy stores that failed"); _totalProjectionStoreReplacements = metricFactory.CreateCounter( "dolittle_shared_runtime_projections_store_replace_total", "ProjectionStore total number of Replace requests"); _totalFailedProjectionStoreReplacements = metricFactory.CreateCounter( "dolittle_shared_runtime_projections_store_replace_failed_total", "ProjectionStore total number of Replace requests that have failed"); _totalRemoveAttempts = metricFactory.CreateCounter( "dolittle_shared_runtime_projections_persister_remove_total", "ProjectionPersister total number of Remove requests"); _totalCopyStoreRemovals = metricFactory.CreateCounter( "dolittle_shared_runtime_projections_persister_remove_copy_total", "ProjectionPersister total number of Remove in copy stores that succeeded"); _totalFailedCopyStoreRemovals = metricFactory.CreateCounter( "dolittle_shared_runtime_projections_persister_remove_copy_failed_total", "ProjectionPersister total number of Remove in copy stores that failed"); _totalProjectionStoreRemovals = metricFactory.CreateCounter( "dolittle_shared_runtime_projections_store_remove_total", "ProjectionStore total number of Remove requests"); _totalFailedProjectionStoreRemovals = metricFactory.CreateCounter( "dolittle_shared_runtime_projections_store_remove_failed_total", "ProjectionStore total number of Remove requests that have failed"); _totalDropAttempts = metricFactory.CreateCounter( "dolittle_shared_runtime_projections_persister_drop_total", "ProjectionPersister total number of Drop requests"); _totalCopyStoreDrops = metricFactory.CreateCounter( "dolittle_shared_runtime_projections_persister_drop_copy_total", "ProjectionPersister total number of Drop in copy stores that succeeded"); _totalFailedCopyStoreDrops = metricFactory.CreateCounter( "dolittle_shared_runtime_projections_persister_drop_copy_failed_total", "ProjectionPersister total number of Drop in copy stores that failed"); _totalProjectionStoreDrops = metricFactory.CreateCounter( "dolittle_shared_runtime_projections_store_drop_total", "ProjectionStore total number of Drop requests"); _totalFailedProjectionStoreDrops = metricFactory.CreateCounter( "dolittle_shared_runtime_projections_store_drop_failed_total", "ProjectionStore total number of Drop requests that have failed"); }
public ICounter Creation() { return(_factory.CreateCounter("counter", string.Empty)); }
public MetricsCollector(IMetricFactory metricFactory) { _currentPendingStreamWrites = metricFactory.CreateGauge( "dolittle_system_runtime_services_reversecalls_pending_writes", "ReverseCall current pending stream writes waiting"); _totalStreamWrites = metricFactory.CreateCounter( "dolittle_system_runtime_services_reversecalls_stream_writes_total", "ReverseCall total number of writes to streams"); _totalStreamWriteBytes = metricFactory.CreateCounter( "dolittle_system_runtime_services_reversecalls_stream_write_bytes_total", "ReverseCall total number of bytes written to streams"); _totalStreamWriteWaitTime = metricFactory.CreateCounter( "dolittle_system_runtime_services_reversecalls_stream_write_wait_seconds_total", "ReverseCall total time spent waiting to write to streams"); _totalStreamWriteTime = metricFactory.CreateCounter( "dolittle_system_runtime_services_reversecalls_stream_write_seconds_total", "ReverseCall total time spent writing to streams"); _totalStreamReads = metricFactory.CreateCounter( "dolittle_system_runtime_services_reversecalls_stream_reads_total", "ReverseCall total number of reads from streams"); _totalStreamReadBytes = metricFactory.CreateCounter( "dolittle_system_runtime_services_reversecalls_stream_read_bytes_total", "ReverseCall total number of bytes read from streams"); _totalPingsSent = metricFactory.CreateCounter( "dolittle_system_runtime_services_reversecalls_pings_sent_total", "ReverseCall total number of pings sent"); _totalPongsReceived = metricFactory.CreateCounter( "dolittle_system_runtime_services_reversecalls_pongs_received_total", "ReverseCall total number of pongs received"); _totalKeepaliveResets = metricFactory.CreateCounter( "dolittle_system_runtime_services_reversecalls_keepalive_resets_total", "ReverseCall total number of times ping keepalive tokens have been reset"); _totalKeepaliveTimeouts = metricFactory.CreateCounter( "dolittle_system_runtime_services_reversecalls_keepalive_timeouts_total", "ReverseCall total number of times ping keepalive tokens have timed out"); _totalFirstMessageWaitTime = metricFactory.CreateCounter( "dolittle_system_runtime_services_reversecalls_first_message_wait_seconds_total", "ReverseCall total time spent waiting for first message"); }
public CounterController(IMetricFactory metricFactory) { _counter = metricFactory.CreateCounter("my_counter", "some help about this"); _conterLabel = metricFactory.CreateCounter("my_counter_label", "some help about this", ("label1", "label2")); _counterTs = metricFactory.CreateCounter("my_counter_ts", "some help about this", true); }
public Worker(ILogger <Worker> logger, IMetricFactory metricFactory) { _logger = logger; _counter = metricFactory.CreateCounter("my_count", "help text"); }
public CounterController(IMetricFactory metricFactory) { this._counter = metricFactory.CreateCounter("my_counter", "some help about this"); }
public DemoProcessor(PartitionContext partitionContext, ILoggerFactory loggerFactory, IMetricFactory metricFactory) { _logger = loggerFactory.CreateLogger("DemoProcessor"); _processedCounter = metricFactory.CreateCounter("dp_message_count", "The number of messages processed since the processor started", false, new string[0]); }
/// <summary> /// Create Counter. /// </summary> /// <param name="factory">Metric factory</param> /// <param name="name">Name.</param> /// <param name="help">Help text.</param> /// <param name="labelNames">Array of label names.</param> public static IMetricFamily <ICounter> CreateCounter(this IMetricFactory factory, string name, string help, params string[] labelNames) { return(factory.CreateCounter(name, help, false, labelNames)); }
public static IMetricFamily <ICounter, ValueTuple <string> > CreateCounter(this IMetricFactory factory, string name, string help, string labelName, bool includeTimestamp = false) { return(factory.CreateCounter(name, help, ValueTuple.Create(labelName), includeTimestamp)); }