Skip to content

Generic client instrumentation #7

@isaachier

Description

@isaachier

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions