Interface RequestListener
- All Superinterfaces:
OperationListener
Deprecated.
A listener of the start and end of an instrumented operation. The
onStart(Context, Attributes, long) methods will be called as early as possible in the processing of a request;
and the onEnd(Context, Attributes, long) method will be called as late as possible when
finishing the processing of a response. These correspond to the start and end of a span when
tracing.-
Method Summary
Modifier and TypeMethodDescriptiondefault voidend(io.opentelemetry.context.Context context, io.opentelemetry.api.common.Attributes endAttributes, long endNanos) Deprecated.Implement theonEnd(Context, Attributes, long)method instead.default voidonEnd(io.opentelemetry.context.Context context, io.opentelemetry.api.common.Attributes endAttributes, long endNanos) Deprecated.Listener method that is called at the end of an instrumented operation.default io.opentelemetry.context.ContextonStart(io.opentelemetry.context.Context context, io.opentelemetry.api.common.Attributes startAttributes, long startNanos) Deprecated.Listener method that is called at the start of an instrumented operation.default io.opentelemetry.context.Contextstart(io.opentelemetry.context.Context context, io.opentelemetry.api.common.Attributes startAttributes, long startNanos) Deprecated.Implement theonStart(Context, Attributes, long)method instead.
-
Method Details
-
start
@Deprecated default io.opentelemetry.context.Context start(io.opentelemetry.context.Context context, io.opentelemetry.api.common.Attributes startAttributes, long startNanos) Deprecated.Implement theonStart(Context, Attributes, long)method instead.Listener method that is called at the start of a request. If any state needs to be kept between the start and end of the request, e.g., an in-progress span, it should be added to the passed inContextand returned.- Parameters:
startNanos- The nanosecond timestamp marking the start of the request. Can be used to compute the duration of the entire operation.
-
onStart
default io.opentelemetry.context.Context onStart(io.opentelemetry.context.Context context, io.opentelemetry.api.common.Attributes startAttributes, long startNanos) Deprecated.Description copied from interface:OperationListenerListener method that is called at the start of an instrumented operation. If any state needs to be kept between the start and end of the processing, e.g., an in-progress span, it should be added to the passed inContextand returned.- Specified by:
onStartin interfaceOperationListenerstartNanos- The nanosecond timestamp marking the start of the operation. Can be used to compute the duration of the entire operation.
-
end
@Deprecated default void end(io.opentelemetry.context.Context context, io.opentelemetry.api.common.Attributes endAttributes, long endNanos) Deprecated.Implement theonEnd(Context, Attributes, long)method instead.Listener method that is called at the end of a request.- Parameters:
endNanos- The nanosecond timestamp marking the end of the request. Can be used to compute the duration of the entire operation.
-
onEnd
default void onEnd(io.opentelemetry.context.Context context, io.opentelemetry.api.common.Attributes endAttributes, long endNanos) Deprecated.Description copied from interface:OperationListenerListener method that is called at the end of an instrumented operation.- Specified by:
onEndin interfaceOperationListenerendNanos- The nanosecond timestamp marking the end of the operation. Can be used to compute the duration of the entire operation.
-
OperationListenerinstead.