Hi team,
I'm using Java, Netflix DGS, and WebFlux. I want to see what kind of query being made to /graphql (operation name in /graphql endpoint)
But on my test, it wasn’t shown. Could you guys help me?
Many thanks!
If you know where in your code or in the library code is the query used, you can configure request attributes capturing the method arguments. You can also use OpenTelemetry instrumentation for GraphQL and have Dynatrace capture the span attributes provided by the OpenTelemetry instrumentation, which is probably the easiest way.
Be sure to check the Observability clinic recording on GraphQL and Dynatrace and how to leverage OpenTelemetry to provide you with more insights into your GraphQL applications.
Hi @Julius_Loman ,
Thank you for your reply.
Observability clinic is talking GraphQL and Node but I'm using GraphQL in Java so It can't help me now. Could you have any documentation about GraphQL, Java, Netflix DGS, and WebFlux?
@nhutdangqn there is a section about other languages at https://www.youtube.com/watch?v=_-ZPhwOWzmw&t=1542s , basically mentioning you should use https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation/graph... in your project. The docs seys a standalone instrumentation is supported, so you don't need OpenTelemetry Java Agent for it.
Also, be sure to have the OneAgent feature flag for Opentelemetry turned on (OpenTelemetry (Java) ), so Dynatrace can pick up the OpenTelemetry spans.
@Julius_Loman and anyone,
does that mean dynatrace doesn't support graphql tracing besides nodejs out of the box?
We assumed it support graphql in general out of the box https://www.dynatrace.com/hub/detail/graphql/.
Thanks in advance.
Yes , that's correct. Only NodeJS is supported out of box as it is mentioned in the technology support page and also on the hub page. For traces from other languages you need to use either opentelemetry or create a custom instrumentation with the otel being a recommended approach.