| | | 1 | | // Copyright (c) ZeroC, Inc. |
| | | 2 | | |
| | | 3 | | using IceRpc.Metrics; |
| | | 4 | | |
| | | 5 | | namespace IceRpc.Extensions.DependencyInjection; |
| | | 6 | | |
| | | 7 | | /// <summary>Provides an extension method for <see cref="IInvokerBuilder" /> to add a metrics interceptor.</summary> |
| | | 8 | | public static class MetricsInvokerBuilderExtensions |
| | | 9 | | { |
| | | 10 | | /// <summary>Adds a <see cref="MetricsInterceptor" /> to the builder.</summary> |
| | | 11 | | /// <param name="builder">The builder being configured.</param> |
| | | 12 | | /// <returns>The builder being configured.</returns> |
| | | 13 | | public static IInvokerBuilder UseMetrics(this IInvokerBuilder builder) => |
| | 0 | 14 | | builder.Use(next => new MetricsInterceptor(next)); |
| | | 15 | | } |