Class NettyRequestMetrics
java.lang.Object
software.amazon.awssdk.http.nio.netty.internal.NettyRequestMetrics
Utilities for collecting and publishing request-level metrics.
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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 Details
-
metricsAreEnabled
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. -
measureTimeTaken
-