Class MetricsPipelineExtensions
- Namespace
- IceRpc
- Assembly
- IceRpc.Metrics.dll
Provides an extension method for Pipeline to add the metrics interceptor.
public static class MetricsPipelineExtensions
- Inheritance
-
MetricsPipelineExtensions
- Inherited Members
Methods
UseMetrics(Pipeline)
Adds a MetricsInterceptor to the pipeline.
public static Pipeline UseMetrics(this Pipeline pipeline)
Parameters
pipeline
PipelineThe pipeline being configured.
Returns
- Pipeline
The pipeline being configured.
Examples
The following code adds the metrics interceptor to the invocation pipeline.
// Create a client connection.
await using var connection = new ClientConnection(new Uri("icerpc://localhost"));
// Create an invocation pipeline and install the metrics interceptor.
Pipeline pipeline = new Pipeline()
.UseMetrics()
.Into(connection);
- See Also