-
Notifications
You must be signed in to change notification settings - Fork 144
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-4.3.0 instrumentation is not working when @EnableFeignClients is used - resulting in invalid transaction name #1197
Comments
@mgr32 thank you for alerting us to this behavior. We are reviewing internally |
@mgr32 our Team has agreed to pull this into our backlog. We cannot commit to a date at the moment but as we plan our work for future quarters, we will consider this issue. Thank you! |
@kford-newrelic can this prioritised? Spring4x is not longer maintained from long time (https://endoflife.date/spring-framework). For many users "Transaction" is most important feature of NewRelic. In our case workaround proposed by @mgr32 doesn't seems to work properly. If NewRelic stops providing us with this feature (in the next few months we will have to migrate to the latest Spring anyway) it means for us that we will have to start looking for an alternative solution for NewRelic. What is the recommendation for users for which mentioned feature stoped working with update to Spring Boot 3.0+? |
@kford-newrelic I was able to create a simpler example without Feign, and I think it's an issue with caching of In order to work around the issue, I believe we would need to ensure that all |
Additional findings There is an additional issue with SpringPointCut not migrated from Summary There seem to be 2 separate issues:
See simpler-example-with-analysis for a minimal reproducible example. Note that the transactions are named in the following way:
The fix for the second issue ( Further analysis of spring-4.3.0 issue The root cause of the ( Consider the following classes:
The following happens when
Thus, if |
Hi @mgr32, |
@mgr32 really appreciate your insight into this issue! We tried to target this for the coming Jul-Sep quarter but it doesn't look like we'll have the bandwidth. Going to try for the Oct-Dec (Q3) quarter. |
Add weave violation filter support. Resolves #1197
Hi @jtduffy @kford-newrelic, thanks a lot for fixing the issue earlier than estimated, it looks like it helps :) |
@jtduffy, @kford-newrelic, one more question - any chance of migrating SpringPointCut class from It is still used e.g. for handling not matched HTTP requests (returning 404) - in Spring Boot 2 they are logged e.g. as |
Description
When Spring Boot 3 is used and Spring Cloud OpenFeign's @EnableFeignClients annotation (docs) is added (with specific parameters) to the main class, New Relic's spring-4.3.0 instrumentation stops working and transaction names no longer contain controller method name or endpoint path.
Note the annotation should not logically affect Spring controllers. It is also unknown why "equivalent" parameters of the annotation (
basePackages
vsbasePackageClasses
) affect the resulting transaction name. The exact result depends on Spring Boot / Spring Cloud version and specific parameters of the annotation:@EnableFeignClients(basePackages = "com.example.demo")
@EnableFeignClients(basePackageClasses = TestClient.class)
or@EnableFeignClients(clients = TestClient.class)
@EnableFeignClients(basePackages = "com.example.demo")
@EnableFeignClients(basePackageClasses = TestClient.class)
or@EnableFeignClients(clients = TestClient.class)
More details at https://github.com/mgr32/newrelic-spring-cloud-openfeign-issue
Expected Behavior
spring-4.3.0 instrumentation should work in each case, and transaction name should be consistent (possibly always WebTransaction/SpringController/hello (GET))
Troubleshooting
When the transaction name is not "WebTransaction/SpringController/hello (GET)" the following entry is logged by the NewRelic Java Agent:
Steps to Reproduce
Described at https://github.com/mgr32/newrelic-spring-cloud-openfeign-issue
Your Environment
Reproduced locally and at cloud instances.
The text was updated successfully, but these errors were encountered: