newrelic-java-agent
newrelic-java-agent copied to clipboard
GraphQL Java queries not displayed as Web transactions/GraphQL transactions
Description
When running a Spring application with GraphQL Java with the New Relic current agent download from https://download.newrelic.com/newrelic/java-agent/newrelic-agent/current GraphQL queries are not displayed as GraphQL transactions in the New Relic UI. They are shown as POST Spring transactions.
The Introspection queries are always displayed as expected as GraphQL transactions.
Expected Behavior
POST GraphQL queries should be displayed as Web transactions / GraphQL Transactions in New Relic UI
Troubleshooting or NR Diag results
The issue is only happening when using the New Relic agent JAR downloaded from the NR website or when using a release branch. An agent built from the main branch works as expected.
During testing/debugging I have made no changes to the Spring application itself.
Steps to Reproduce
(Not working) Current:
- Download current agent from https://download.newrelic.com/newrelic/java-agent/newrelic-agent/current
- Run application JAR with
-javaagent:newrelic.jar - GraphQL queries are shown as Web transactions / POST Spring Transactions in New Relic UI
(Not working) 8.0.1-release:
- Clone repo
- Checkout branch
8.0.1-release - Run
./gradlew clean jar - Run application JAR with
-javaagent:newrelic.jarwherenewrelic.jaris the artifactnewrelic-agent/build/newrelicJar/newrelic.jar - GraphQL queries are shown as Web transactions / POST Spring Transactions in New Relic UI
(Working) main:
- Clone repo
- Checkout branch
main - Run
./gradlew clean jar - Run application JAR with
-javaagent:newrelic.jarwherenewrelic.jaris the artifactnewrelic-agent/build/newrelicJar/newrelic.jar - GraphQL queries are shown as Web transactions / GraphQL Transactions in New Relic UI
Your Environment
JDK 17 / Spring Webflux 5.3.24 / GraphQL Java 18.3
Additional context
https://issues.newrelic.com/browse/NEWRELIC-7647
@benoitcanton thanks for letting us know about this issue - we are reviewing internally
@benoitcanton could you clarify this for us:
Your description indicates that building from the main branch produces the expected transaction name and looking at the calendar, since you originally reported this we've released version 8.1.0 - can you confirm a) what is the behavior you see when you use the 8.1.0 jar downloaded from New Relic and b) what is the behavior you see when you build the agent from the 8.1.0 tag yourself?
Essentially, we want to rule in/out the possibility that there may have been a code change affecting this that you pulled down/built yourself and if so, that same code change may be in the 8.1.0 release (and hopefully you see the expected transaction name with that).
Closing this issue for now as no response from customer.