Class HttpServerExperimentalMetrics
java.lang.Object
io.opentelemetry.instrumentation.api.incubator.semconv.http.HttpServerExperimentalMetrics
- All Implemented Interfaces:
io.opentelemetry.instrumentation.api.instrumenter.OperationListener
public final class HttpServerExperimentalMetrics
extends Object
implements io.opentelemetry.instrumentation.api.instrumenter.OperationListener
OperationListener which keeps track of non-stable
HTTP server metrics: the
number of in-flight request, the
request size and the
response size.-
Method Summary
Modifier and TypeMethodDescriptionstatic io.opentelemetry.instrumentation.api.instrumenter.OperationMetricsget()Returns aOperationMetricswhich can be used to enable recording ofHttpServerExperimentalMetricson anInstrumenterBuilder.voidonEnd(io.opentelemetry.context.Context context, io.opentelemetry.api.common.Attributes endAttributes, long endNanos) io.opentelemetry.context.ContextonStart(io.opentelemetry.context.Context context, io.opentelemetry.api.common.Attributes startAttributes, long startNanos)
-
Method Details
-
get
public static io.opentelemetry.instrumentation.api.instrumenter.OperationMetrics get()Returns aOperationMetricswhich can be used to enable recording ofHttpServerExperimentalMetricson anInstrumenterBuilder. -
onStart
public io.opentelemetry.context.Context onStart(io.opentelemetry.context.Context context, io.opentelemetry.api.common.Attributes startAttributes, long startNanos) - Specified by:
onStartin interfaceio.opentelemetry.instrumentation.api.instrumenter.OperationListener
-
onEnd
public void onEnd(io.opentelemetry.context.Context context, io.opentelemetry.api.common.Attributes endAttributes, long endNanos) - Specified by:
onEndin interfaceio.opentelemetry.instrumentation.api.instrumenter.OperationListener
-