Interface Instrumentation.Context

All Superinterfaces:
AutoCloseable
Enclosing interface:
Instrumentation

public static interface Instrumentation.Context extends AutoCloseable
A context with lifecycle callbacks for the various stages of request and response processing. Must be close()d.
  • Method Details

    • makeCurrent

      Sets this context (or the underlying abstraction) as the current thread's scope, so that neste call can nest child contexts.
    • beforeSendingHttpRequest

      void beforeSendingHttpRequest(TransportHttpClient.Request httpRequest, TransportOptions options)
      Called once the initial API request has been serialized and the http request has been prepared.
    • afterReceivingHttpResponse

      void afterReceivingHttpResponse(TransportHttpClient.Response httpResponse)
      Called after the http response has been received, and before analyzing it.
    • afterDecodingApiResponse

      <TResponse> void afterDecodingApiResponse(TResponse apiResponse)
      Called after the http response has been deserialized
    • recordException

      void recordException(Throwable thr)
      Called when any stage of request processing caused a failure.
    • close

      void close()
      Specified by:
      close in interface AutoCloseable