Table of Contents

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

instanceStore IInstanceStore
containerManager IContainerManager
logger ILogger<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

stoppingToken CancellationToken

Triggered when StopAsync(CancellationToken) is called.

Returns

Task

A Task that represents the long running operations.

Remarks

See Worker Services in .NET for implementation guidelines.