Skip to content

NewRelic stops displaying external service calls after enabling use of the virtual threads #2835

@Kristo1995

Description

@Kristo1995

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

  1. Have a Java Spring Boot application that uses Spring GraphQL, and makes calls to external services using RestClient.
  2. Enable the use virtual threads within the application.
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Reviewed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions