Class NettyRequestMetrics
- java.lang.Object
-
- software.amazon.awssdk.http.nio.netty.internal.NettyRequestMetrics
-
public class NettyRequestMetrics extends Object
Utilities for collecting and publishing request-level metrics.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidifMetricsAreEnabled(MetricCollector metrics, Consumer<MetricCollector> metricsConsumer)static voidmeasureTimeTaken(io.netty.util.concurrent.Future<?> future, Consumer<Duration> onDone)Measure the time taken for aFutureto complete.static booleanmetricsAreEnabled(MetricCollector metricCollector)Determine whether metrics are enabled, based on the provided metric collector.static voidpublishHttp2StreamMetrics(MetricCollector metricCollector, io.netty.channel.Channel channel)Publish stream metrics for the provided stream channel to the provided collector.
-
-
-
Method Detail
-
metricsAreEnabled
public static boolean metricsAreEnabled(MetricCollector metricCollector)
Determine whether metrics are enabled, based on the provided metric collector.
-
ifMetricsAreEnabled
public static void ifMetricsAreEnabled(MetricCollector metrics, Consumer<MetricCollector> metricsConsumer)
-
publishHttp2StreamMetrics
public static void publishHttp2StreamMetrics(MetricCollector metricCollector, io.netty.channel.Channel channel)
Publish stream metrics for the provided stream channel to the provided collector. This should only be invoked after the stream has been initialized. If the stream is not initialized when this is invoked, an exception will be thrown.
-
-