Class MetricsMiddleware
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
IDispatcherThe 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
IncomingRequestThe incoming request being dispatched.
cancellationToken
CancellationTokenA cancellation token that receives the cancellation requests.
Returns
- ValueTask<OutgoingResponse>
The outgoing response.