wingtips
wingtips copied to clipboard
Implement an interceptor for Apache's HttpAsyncClient
The wingtips-apache-http-client library contains an interceptors for the HttpClient. While the interceptors implement the interfaces necessary for Apache's HttpAsyncClient, they work properly in the async client.
The existing WingtipsApacheHttpClientInterceptor starts new subspans via the request interceptor on the current thread (from which the request is executed) but when the response is handled, the async client executes the response interceptor on a different thread. This causes the subspan to never be closed and produces errors when the parent span is finalized.