-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spring boot AI and Spring Cloud Zuul problem #676
Comments
@matyee thank you for your comment on AI. Few questions:
Further, it looks to me that Zuul filter is throwing some exception when they are passing filter chain. It would be much easier to investigate this, if you can provide a small repro of the application which we can work on or atleast provide steps on how we can reproduce this issue. Please specify springboot version, netflix zuul version and any other dependencies you have in your setup. |
@dhaval24 thank you for your reply. Sorry I was not infromative enough. I was in a rush. I use Zuul as the edge service of a microservices architecture running on App Services. The microservices all offer their REST APIs. Every client requests hit the edge service first. I have routes defined in Zuul to route the traffic to the appripriate downstream microservice. Zuul uses Apache http and I would like to see the telemetry of those subsequent calls. I have created a small repository. https://github.com/matyee/zuultest . I defined a single route only. The I included Application Insights using the Spring Boots starter. I also checked in the used agent in the repository. Without the agent the service wokrs well, it also sends the telemetry to AI. If I ad the javaagent I get the error mentioned at the beginning of the thread. |
@matyee thank you very much for the details and creating a small application which could be used for testing. So if I assume correctly once I run this app and hit the URL: /time/now it will throw the error correct ?when agent is being used. |
@matyee it seems like there is an issue in the agent instrumentation of HTTP. Basically we instrument HttpUriRequest interface for the ApacheHttpClient but it seems like the Zuul library uses BasicHttpRequest. Due to the agent instrumentation byte code is modified and then it throws this exception of IncompitableClassChange. Most probably there needs to be a fix in the agent to make this work. As a work around you can currently disable the HTTP tracking in agent and use it to capture other dependencies like SQL etc if you have. You can manually wrap the outgoing HTTP request from your edge service with trackDependency() calls, sure it is some work but you might want to do it until a fix is released. Thanks for bringing the issue up here. |
@dhaval - By looking at the exception stack, it seems the instrumentation code added to the doExecute method assumes the second argument will be org.apache.http.client.methods.HttpUriRequest. That's not always the case, as seen in this example. The doExecute method's second param is guaranteed to be org.apache.http.HttpRequest, not HttpUriRequest. To repro, you can just do something like this in your test app (taken from what Zuul is doing) httpRequest = new BasicHttpRequest(verb, uriWithQueryString); |
Hi @dhaval24, when will the fix be released? It blocks the AI integration into routing services... |
@tomaszglinski we plan to release a new version with this anytime in next two weeks. You should be unblocked with it. |
@dhaval24 thanks for info |
Hi,
First of all, the AI for JAVA is awesome. I am using it with multiple Spring Boot based applications and they work fine both the SDK and the Agent. I use Netflix's Zuul proxy through the Spring Cloud Zuul project. The SDK works well with the edge service, but when I add the agent, the calls made against the edge service throws the following error:
I am lost here, have no idea what the error message want to mean. Can someone help me with this? Dependency tracking would be essential on the edge server.
The text was updated successfully, but these errors were encountered: