Description
We have a Java Spring Boot application which uses Spring GraphQL, and makes calls to external services using RestClient. When we enable use of virtual threads, the calls to external services stop being displayed on NewRelic.
Expected Behavior
The calls to external services should keep being displayed after enabling the use of virtual threads.
Didn't manage to troubleshoot the issue, and couldn't find existing issues/forum threads on the issue.
Steps to Reproduce
- Have a Java Spring Boot application that uses Spring GraphQL, and makes calls to external services using RestClient.
- Enable the use virtual threads within the application.
- The calls to external services should stop being displayed.
Unfortunately haven't got a sample application on hand, and can't share the actual application.
Your Environment
Java 21
Spring Boot 3.5.11
NewRelic Java Agent 9.1.0
Additional context
The current workaround seems to be creating our own NewRelicTokenTaskDecorator implementing org.springframework.core.task.TaskDecorator, which links the com.newrelic.api.agent.Token, runs the runnable, and then expires the token.
Description
We have a Java Spring Boot application which uses Spring GraphQL, and makes calls to external services using RestClient. When we enable use of virtual threads, the calls to external services stop being displayed on NewRelic.
Expected Behavior
The calls to external services should keep being displayed after enabling the use of virtual threads.
Troubleshooting or NR Diag results
Didn't manage to troubleshoot the issue, and couldn't find existing issues/forum threads on the issue.
Steps to Reproduce
Unfortunately haven't got a sample application on hand, and can't share the actual application.
Your Environment
Java 21
Spring Boot 3.5.11
NewRelic Java Agent 9.1.0
Additional context
The current workaround seems to be creating our own
NewRelicTokenTaskDecoratorimplementingorg.springframework.core.task.TaskDecorator, which links thecom.newrelic.api.agent.Token, runs the runnable, and then expires the token.