newrelic-java-agent icon indicating copy to clipboard operation
newrelic-java-agent copied to clipboard

GraphQL Java queries not displayed as Web transactions/GraphQL transactions

Open benoitcanton opened this issue 2 years ago • 3 comments

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.

Screenshot 2023-03-18 at 5 57 09 pm

Steps to Reproduce

(Not working) Current:

  1. Download current agent from https://download.newrelic.com/newrelic/java-agent/newrelic-agent/current
  2. Run application JAR with -javaagent:newrelic.jar
  3. GraphQL queries are shown as Web transactions / POST Spring Transactions in New Relic UI

(Not working) 8.0.1-release:

  1. Clone repo
  2. Checkout branch 8.0.1-release
  3. Run ./gradlew clean jar
  4. Run application JAR with -javaagent:newrelic.jar where newrelic.jar is the artifact newrelic-agent/build/newrelicJar/newrelic.jar
  5. GraphQL queries are shown as Web transactions / POST Spring Transactions in New Relic UI

(Working) main:

  1. Clone repo
  2. Checkout branch main
  3. Run ./gradlew clean jar
  4. Run application JAR with -javaagent:newrelic.jar where newrelic.jar is the artifact newrelic-agent/build/newrelicJar/newrelic.jar
  5. 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

benoitcanton avatar Mar 18 '23 07:03 benoitcanton

https://issues.newrelic.com/browse/NEWRELIC-7647

@benoitcanton thanks for letting us know about this issue - we are reviewing internally

kbford56 avatar Apr 20 '23 20:04 kbford56

@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).

kbford56 avatar Apr 26 '23 15:04 kbford56

Closing this issue for now as no response from customer.

kmudduluru avatar Mar 17 '25 17:03 kmudduluru