Table of Contents

Interface ICarrotMetricsRecorder

Namespace
CarrotMQ.Core.Telemetry
Assembly
CarrotMQ.Core.dll

Interface for recording metrics related to CarrotMQ processing, such as request duration and message delivery status.

public interface ICarrotMetricsRecorder : IDisposable
Inherited Members

Methods

EndConsuming(long, DeliveryStatus)

Records the metrics of the end of message consuming. Captures the duration and delivery status.

void EndConsuming(long timestamp, DeliveryStatus deliveryStatus)

Parameters

timestamp long

The timestamp when the incoming message was received (in ticks or UnixTimeMilliseconds depending on the current .NET version).

deliveryStatus DeliveryStatus

The status of the message delivery.

RecordMessageType(string)

Records the metric to count messages based on calledMethod

void RecordMessageType(string calledMethod)

Parameters

calledMethod string

ResponsePublished(string, int)

Record metric for response publishing (CalledMethod and StatusCode)

void ResponsePublished(string calledMethod, int statusCode)

Parameters

calledMethod string

CalledMethod of the response message (Response:RequestCalledMethod)

statusCode int

Status code of the response

StartConsuming()

Records the metrics for the start of message consuming.

long StartConsuming()

Returns

long

The current timestamp when the message is received (in ticks or UnixTimeMilliseconds depending on the current .NET version).