Class OrchestratorMetricsCollector
- Namespace
- Bielu.Microservices.Orchestrator.OpenTelemetry.Instrumentation
- Assembly
- Bielu.Microservices.Orchestrator.OpenTelemetry.dll
Background service that periodically collects orchestrator and host gauge metrics and exposes them via OpenTelemetry observable instruments.
public sealed class OrchestratorMetricsCollector : BackgroundService, IHostedService, IDisposable
- Inheritance
-
OrchestratorMetricsCollector
- Implements
- Inherited Members
Constructors
OrchestratorMetricsCollector(IInstanceStore, IContainerManager, ILogger<OrchestratorMetricsCollector>)
Background service that periodically collects orchestrator and host gauge metrics and exposes them via OpenTelemetry observable instruments.
public OrchestratorMetricsCollector(IInstanceStore instanceStore, IContainerManager containerManager, ILogger<OrchestratorMetricsCollector> logger)
Parameters
instanceStoreIInstanceStorecontainerManagerIContainerManagerloggerILogger<OrchestratorMetricsCollector>
Methods
ExecuteAsync(CancellationToken)
This method is called when the IHostedService starts. The implementation should return a task that represents the lifetime of the long running operation(s) being performed.
protected override Task ExecuteAsync(CancellationToken stoppingToken)
Parameters
stoppingTokenCancellationTokenTriggered when StopAsync(CancellationToken) is called.
Returns
Remarks
See Worker Services in .NET for implementation guidelines.