-
Notifications
You must be signed in to change notification settings - Fork 17
Description
At the moment, the only way to create a client with tracing instrumentation is to use the builder provided by this library, TracingHttpClientBuilder, which extends the HttpClientBuilder from Apache. The problem with this approach is that AsyncHttpClient cannot be instrumented at all. This builder only creates one type of client and will not support any other client.
My suggestion is to follow the precedent from the legacy Jaeger API (https://github.com/jaegertracing/legacy-client-java/blob/master/jaeger-apachehttpclient/src/main/java/com/uber/jaeger/httpclient/TracingInterceptors.java). Any builder that supports adding interceptors can be added to this class.
Parenthetically, I wish there were a generic way to handle all builders generically instead of adding each one to the class. The only solution seems to be using the java.lang.invoke package. But, that's not the approach I recommend for now.