public class TracingClientExec extends Object implements org.apache.http.impl.execchain.ClientExecChain
ProtocolExec which is invoked as
the next to last. Note that RedirectExec is invoked before
so this exec has to deal with redirects.| Modifier and Type | Field and Description |
|---|---|
protected static String |
REDIRECT_COUNT
Tracing
ClientExecChain is executed after redirect exec, so on redirects it is called
multiple times. |
protected static String |
SPAN_PROP
Id of
HttpCoreContext.setAttribute(String, Object) representing span associated with
the current client processing. |
| Constructor and Description |
|---|
TracingClientExec(org.apache.http.impl.execchain.ClientExecChain clientExecChain,
org.apache.http.client.RedirectStrategy redirectStrategy,
boolean redirectHandlingDisabled,
boolean injectDisabled,
io.opentracing.Tracer tracer,
List<ApacheClientSpanDecorator> spanDecorators) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.http.client.methods.CloseableHttpResponse |
execute(org.apache.http.conn.routing.HttpRoute route,
org.apache.http.client.methods.HttpRequestWrapper request,
org.apache.http.client.protocol.HttpClientContext clientContext,
org.apache.http.client.methods.HttpExecutionAware execAware) |
protected io.opentracing.Span |
handleLocalSpan(org.apache.http.HttpRequest httpRequest,
org.apache.http.client.protocol.HttpClientContext clientContext) |
protected org.apache.http.client.methods.CloseableHttpResponse |
handleNetworkProcessing(io.opentracing.Span parentSpan,
org.apache.http.conn.routing.HttpRoute route,
org.apache.http.client.methods.HttpRequestWrapper request,
org.apache.http.client.protocol.HttpClientContext clientContext,
org.apache.http.client.methods.HttpExecutionAware execAware) |
protected static final String SPAN_PROP
HttpCoreContext.setAttribute(String, Object) representing span associated with
the current client processing. Referenced span is local span not a span representing HTTP communication.protected static final String REDIRECT_COUNT
ClientExecChain is executed after redirect exec, so on redirects it is called
multiple times. This is used as an id for HttpCoreContext.setAttribute(String, Object)
to store number of redirects.public TracingClientExec(org.apache.http.impl.execchain.ClientExecChain clientExecChain,
org.apache.http.client.RedirectStrategy redirectStrategy,
boolean redirectHandlingDisabled,
boolean injectDisabled,
io.opentracing.Tracer tracer,
List<ApacheClientSpanDecorator> spanDecorators)
public org.apache.http.client.methods.CloseableHttpResponse execute(org.apache.http.conn.routing.HttpRoute route,
org.apache.http.client.methods.HttpRequestWrapper request,
org.apache.http.client.protocol.HttpClientContext clientContext,
org.apache.http.client.methods.HttpExecutionAware execAware)
throws IOException,
org.apache.http.HttpException
execute in interface org.apache.http.impl.execchain.ClientExecChainIOExceptionorg.apache.http.HttpExceptionprotected io.opentracing.Span handleLocalSpan(org.apache.http.HttpRequest httpRequest,
org.apache.http.client.protocol.HttpClientContext clientContext)
protected org.apache.http.client.methods.CloseableHttpResponse handleNetworkProcessing(io.opentracing.Span parentSpan,
org.apache.http.conn.routing.HttpRoute route,
org.apache.http.client.methods.HttpRequestWrapper request,
org.apache.http.client.protocol.HttpClientContext clientContext,
org.apache.http.client.methods.HttpExecutionAware execAware)
throws IOException,
org.apache.http.HttpException
IOExceptionorg.apache.http.HttpExceptionCopyright © 2020. All rights reserved.