Interface Instrumentation.Context
- All Superinterfaces:
AutoCloseable
- Enclosing interface:
- Instrumentation
A context with lifecycle callbacks for the various stages of request and response processing. Must be
close()d.-
Method Summary
Modifier and TypeMethodDescription<TResponse>
voidafterDecodingApiResponse(TResponse apiResponse) Called after the http response has been deserializedvoidafterReceivingHttpResponse(TransportHttpClient.Response httpResponse) Called after the http response has been received, and before analyzing it.voidbeforeSendingHttpRequest(TransportHttpClient.Request httpRequest, TransportOptions options) Called once the initial API request has been serialized and the http request has been prepared.voidclose()Sets this context (or the underlying abstraction) as the current thread's scope, so that neste call can nest child contexts.voidrecordException(Throwable thr) Called when any stage of request processing caused a failure.
-
Method Details
-
makeCurrent
Instrumentation.ThreadScope makeCurrent()Sets this context (or the underlying abstraction) as the current thread's scope, so that neste call can nest child contexts. -
beforeSendingHttpRequest
Called once the initial API request has been serialized and the http request has been prepared. -
afterReceivingHttpResponse
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
Called when any stage of request processing caused a failure. -
close
void close()- Specified by:
closein interfaceAutoCloseable
-