I have a Spring Boot app (BRIXTON.release) calling a restful service via Feign. Feign can swap out the default http client for Apache HttpClient which I see being picked up and auto configured correctly.
In the pinpoint debug log I also see the HttpClient4 class being detected on the class path
swapi-proxy_1 | 2016-06-24 17:48:27 [INFO ](c.n.p.p.i.JavassistClassPool :64 ) lib:file:/build/swapi-proxy-0.0.1-SNAPSHOT.jar!/lib/spring-cloud-starter-feign-1.1.0.RELEASE.jar!/
swapi-proxy_1 | 2016-06-24 17:48:27 [INFO ](c.n.p.p.i.JavassistClassPool :64 ) lib:file:/build/swapi-proxy-0.0.1-SNAPSHOT.jar!/lib/feign-httpclient-8.16.2.jar!/
swapi-proxy_1 | 2016-06-24 17:48:27 [INFO ](c.n.p.p.i.JavassistClassPool :64 ) lib:file:/build/swapi-proxy-0.0.1-SNAPSHOT.jar!/lib/httpclient-4.5.2.jar!/
My problem is that I see no traffic through the HttpClient4 library being recorded by the pinpoint agent.
Any thoughts on what might be wrong or how I could explore further? Is there anyway in pinpoint to determine what plugins are active? The application service is working correctly I am just not getting any instrumentation for the HttpClient usage, other parts of the app (User -> app and App -> Redis ) are being instrumented correctly. Just not the calls via Feign using HttpClient4.
Thanks
Hi singram,
Just to make sure, the http call via feign by the Spring Boot app is triggered from a user request, right? So the picture you want is User ---> SpringBoot -- http(via feign) --> RestfulSerivce?
I'm not sure how feign works internally but could there be a thread switch between SpringBoot accepting a request and Feign making a http call? (maybe feign asynchronously invoking the HttpClient)
The problem then is that we keep track of traces via TraceContext stored in thread local, and any time the execution thread changes, we have to propagate the TraceContext over to the new thread. We have plugins that does this automatically, but we don't have one for Feign yet, so if Feign makes any asynchronous calls, anything that comes afterwards will not be traced.
Please let me know if this isn't what's happening so we can further look into it.
Thanks.
Hi @Xylus ,
You have it right. I'm expecting
User ---> SpringBoot -- http(via feign) --> RestfulSerivce
I'm not a java expert by any means but I don't see any indication of a thread swap in the logs. Initially my problem was that httpclient was not being picked up by Feign. I can now verify the use of httpclient but I am still not seeing pinpoint instrument it when used via Feign.
A working example of the Feign -> httpClient issue can be found in the following link.
https://github.com/spring-cloud/spring-cloud-netflix/issues/1143
Libraries are
org.springframework.cloud:spring-cloud-starter-feign
com.netflix.feign:feign-httpclient
org.apache.httpcomponents:httpclient
With the following property to turn logging on
logging.level.org.apache.http: DEBUG
Thanks for the help, any thoughts are much appreciated on how to investigate further.
@singram
I guess your spring boot enable hystrix with feign, it is asynchronous. so you can try set profiler.hystrix true and profiler.rxjava true(for hystrix using rxjava).
pp version:1.7.1
@18474475
i have same question:
my app use pinpoint1.7.1
depends feign, feign - httpclient (or feign - okhttp)
then i enable profiler.rxjava and profiler.Hystrix , but the web client is not show any information, I checked the collector and the agent log, their request is traced.
How can I solve it?
This issue/proposal has been automatically marked as stale because it hasn't had any recent activity. It will automatically be closed if no further activity occurs for 20days. If you think this should still be open, or the problem still persists, just pop a reply in the comments and one of the maintainers will (try!) to follow up. Thank you for your interest and contribution to the Pinpoint Community.
why close
@singram
I guess your spring boot enable hystrix with feign, it is asynchronous. so you can try set profiler.hystrix true and profiler.rxjava true(for hystrix using rxjava).
pp version:1.7.1
it's working for me
Most helpful comment
@singram
I guess your spring boot enable hystrix with feign, it is asynchronous. so you can try set profiler.hystrix true and profiler.rxjava true(for hystrix using rxjava).
pp version:1.7.1