public interface OkHttpClientSpanDecorator
| Modifier and Type | Field and Description |
|---|---|
static OkHttpClientSpanDecorator |
STANDARD_TAGS
Decorator which adds standard HTTP and peer tags to the span.
|
| Modifier and Type | Method and Description |
|---|---|
void |
onError(Throwable throwable,
io.opentracing.Span span)
Decorate span on an error e.g.
|
void |
onRequest(okhttp3.Request request,
io.opentracing.Span span)
Decorate span before a request is made.
|
void |
onResponse(okhttp3.Connection connection,
okhttp3.Response response,
io.opentracing.Span span)
This is invoked after
Interceptor.Chain.proceed(Request) in network interceptor. |
static final OkHttpClientSpanDecorator STANDARD_TAGS
On error it adds Tags.ERROR with log representing exception and
on redirects adds log entries with peer tags.
void onRequest(okhttp3.Request request,
io.opentracing.Span span)
request - requestspan - spanvoid onError(Throwable throwable, io.opentracing.Span span)
UnknownHostException or any exception in interceptor.throwable - exceptionspan - spanvoid onResponse(okhttp3.Connection connection,
okhttp3.Response response,
io.opentracing.Span span)
Interceptor.Chain.proceed(Request) in network interceptor.
In this method it is possible to capture server address, log redirects etc.connection - connectionresponse - responsespan - spanCopyright © 2018. All rights reserved.