Table of Contents

Class MetricsMiddleware

Namespace
IceRpc.Metrics
Assembly
IceRpc.Metrics.dll

A middleware that publishes dispatch metrics using a singleton meter named "IceRpc.Dispatch".

public class MetricsMiddleware : IDispatcher
Inheritance
MetricsMiddleware
Implements
Inherited Members

Constructors

MetricsMiddleware(IDispatcher)

Constructs a metrics middleware.

public MetricsMiddleware(IDispatcher next)

Parameters

next IDispatcher

The next dispatcher in the dispatch pipeline.

Methods

DispatchAsync(IncomingRequest, CancellationToken)

Dispatches an incoming request and returns the corresponding outgoing response.

public ValueTask<OutgoingResponse> DispatchAsync(IncomingRequest request, CancellationToken cancellationToken)

Parameters

request IncomingRequest

The incoming request being dispatched.

cancellationToken CancellationToken

A cancellation token that receives the cancellation requests.

Returns

ValueTask<OutgoingResponse>

The outgoing response.

See Also