Skip to content

Not fully supported asynchttpclient 1.8.x #5987

@linxiaobai

Description

@linxiaobai

Prerequisites

Please check the FAQ, and search existing issues for similar questions before creating a new issue.YOU MAY DELETE THIS PREREQUISITES SECTION.

  • I have checked the FAQ, and issues and found no answer.

What version of pinpoint are you using?

master

Describe the bug

Not fully supported asynchttpclient 1.8.x

pinpoint just enhance method public <T> ListenableFuture<T> executeRequest(Request request, AsyncHandler<T> handler) , but not enhance method public ListenableFuture<Response> executeRequest(Request request)

under asynchttpclient 1.9.0, the method executeRequest(Request request) haven't call the method executeRequest(Request request, AsyncHandler<T> handler), so when I use asynchttpclient 1.8.3 executeRequest(Request request), it can't get trace info.

look at this AsyncHttpClient/async-http-client#706

//AsyncHttpClient.java under 1.9.0 version
  public <T> ListenableFuture<T> executeRequest(Request request, AsyncHandler<T> handler) throws IOException {

        FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(handler).request(request).build();
        fc = preProcessRequest(fc);

        return httpProvider.execute(fc.getRequest(), fc.getAsyncHandler());
    }

    /**
     * Execute an HTTP request.
     *
     * @param request {@link Request}
     * @return a {@link Future} of type Response
     * @throws IOException
     */
    public ListenableFuture<Response> executeRequest(Request request) throws IOException {
        FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(new AsyncCompletionHandlerBase()).request(request).build();
        fc = preProcessRequest(fc);
        return httpProvider.execute(fc.getRequest(), fc.getAsyncHandler());
    }

and this https://github.com/naver/pinpoint/blob/975ed057fbb80c168a60211af0b2e4f7a174297f/plugins/ning-asynchttpclient/src/main/java/com/navercorp/pinpoint/plugin/ning/asynchttpclient/NingAsyncHttpClientPlugin.java

//pinpoint
 final InstrumentMethod executeRequestMethod = InstrumentUtils.findMethod(target, "executeRequest", "com.ning.http.client.Request", "com.ning.http.client.AsyncHandler");
            executeRequestMethod.addInterceptor(ExecuteRequestInterceptor.class);

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions