graphql-java-kickstart / graphql-spring-boot

GraphQL and GraphiQL Spring Framework Boot Starters - Forked from oembedler/graphql-spring-boot due to inactivity.
https://www.graphql-java-kickstart.com/spring-boot/
MIT License
1.51k stars 326 forks source link

When upgrading to Spring Boot 3.1.0 we get in the response the tracing information under extensions #949

Open jimartinmoreno opened 1 year ago

jimartinmoreno commented 1 year ago

Describe the bug We have a service running with Spring Boot 3.0.7 and com.graphql-java-kickstart:graphql-spring-boot-starter:15.0.0. When upgrading to Spring Boot 3.1.0 we get in the response the tracing information under extensions even if we had that disabled in our configuration.

To Reproduce Steps to reproduce the behavior:

  1. upgrade to Spring Boot 3.1.0

Expected behavior No extensions with tracing information in the response

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Screenshot 2023-06-05 at 10 18 10

andykruth-ii commented 10 months ago

Could we get some traction on this? I am also facing the same issue. Luckily, its already fixed!

You should be able to disable the extensions.tracing in the output by setting this in your application.yaml:

graphql:
  servlet:
    tracing-enabled: "false"

This is actually the default value already as you can see here, so it should be disabled by default.

The MetricsInstrumentation is supposed to remove the tracing from the extensions when this is set to false here.

BUT, the last deployed version of MetricsInstrumentation is still using the now deprecated 2 parameter override for instrumentExecutionResult. This was fixed in commit 4c5a3e0 but this has not been released yet.

So, all we need is a new release, which we seem well overdue for.

I have been attempting to pull back graphql-java to version 18.7 (before the method deprecation), but it looks like it is also going to require a version change to graphql-java-tools which I have not found a good version to use yet.

andykruth-ii commented 10 months ago

For anyone stuck on this issue, if a release higher than 15.0.0 has been released, then you can use that.

Otherwise, this workaround worked for me. I am excluding all auto configured TracingInstrumentation and providing my own Beans, including a shim that uses the new ChainedInstrumentation methods. This is not bullet proof, a formal release would be much better.