Table of Contents

Class AppMetrics

Namespace
Virtufin.WorkManager.Services
Assembly
Virtufin.WorkManager.dll

Application-level metrics for the WorkManager service.

public static class AppMetrics
Inheritance
AppMetrics
Inherited Members

Fields

DaprCallLatency

Histogram for Dapr call latency.

public static readonly Histogram<double> DaprCallLatency

Field Value

Histogram<double>

LockContentionEvents

Counter for lock contention events.

public static readonly Counter<long> LockContentionEvents

Field Value

Counter<long>

MessagesProcessed

Counter for messages processed per topic.

public static readonly Counter<long> MessagesProcessed

Field Value

Counter<long>

MeterName

public const string MeterName = "Virtufin.WorkManager"

Field Value

string

WorkerCountByStatus

Number of workers by status (Running, Stopped).

public static readonly ObservableGauge<int> WorkerCountByStatus

Field Value

ObservableGauge<int>

Methods

RecordDaprCallLatency(Activity?)

Records Dapr call latency.

public static void RecordDaprCallLatency(Activity? activity)

Parameters

activity Activity

RecordLockContention(string)

Records a lock contention event.

public static void RecordLockContention(string groupId)

Parameters

groupId string

RecordMessageProcessed(string)

Records a message processed for a topic.

public static void RecordMessageProcessed(string topic)

Parameters

topic string

SetWorkerCounts(int, int)

Updates the worker count gauges.

public static void SetWorkerCounts(int running, int stopped)

Parameters

running int
stopped int