Interface RequestListener

All Superinterfaces:
OperationListener

@Deprecated public interface RequestListener extends OperationListener
Deprecated.
Use OperationListener instead.
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 Type
    Method
    Description
    default void
    end(io.opentelemetry.context.Context context, io.opentelemetry.api.common.Attributes endAttributes, long endNanos)
    Deprecated.
    Implement the onEnd(Context, Attributes, long) method instead.
    default void
    onEnd(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.Context
    onStart(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.Context
    start(io.opentelemetry.context.Context context, io.opentelemetry.api.common.Attributes startAttributes, long startNanos)
    Deprecated.
    Implement the onStart(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 the onStart(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 in Context and 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: OperationListener
      Listener 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 in Context and returned.
      Specified by:
      onStart in interface OperationListener
      startNanos - 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 the onEnd(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: OperationListener
      Listener method that is called at the end of an instrumented operation.
      Specified by:
      onEnd in interface OperationListener
      endNanos - The nanosecond timestamp marking the end of the operation. Can be used to compute the duration of the entire operation.