-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Open
Labels
Milestone
Description
Prerequisites
Please check the FAQ, and search existing issues for similar questions before creating a new issue.YOU MAY DELETE THIS PREREQUISITES SECTION.
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());
}
//pinpoint
final InstrumentMethod executeRequestMethod = InstrumentUtils.findMethod(target, "executeRequest", "com.ning.http.client.Request", "com.ning.http.client.AsyncHandler");
executeRequestMethod.addInterceptor(ExecuteRequestInterceptor.class);