Skip to content
This repository was archived by the owner on Dec 19, 2023. It is now read-only.
This repository was archived by the owner on Dec 19, 2023. It is now read-only.

Cannot disable tracing response with graphql-spring-boot-starter version 15 #976

Description

@steam0

Describe the bug

I am in the progress of upgrading to version 15 of the following dependency

<dependency>
    <groupId>com.graphql-java-kickstart</groupId>
    <artifactId>graphql-spring-boot-starter</artifactId>
    <version>${graphql-java-kickstart.version}</version>
</dependency>

When I do that I get an extensions object in my response like the one below:

{
    "extensions": {
        "tracing": {
            "version": 1,
            "startTime": "2023-11-13T11:31:29.328819Z",
            "endTime": "2023-11-13T11:31:29.435707Z",
            "duration": 107035750,
            "parsing": {
                "startOffset": 2249667,
                "duration": 2161084
            },
            "validation": {
                "startOffset": 7496208,
                "duration": 5197250
            },
            "execution": {
                "resolvers": [
                   (...)
                ] 
            }
        }
    }

I would like to disable this part of the response as it is simply too much data for my clients to load every time. I am reading in the documentation here: https://github.com/graphql-java-kickstart/graphql-spring-boot#tracing-and-metrics

Apollo style tracing along with two levels of metrics based on them are currently configurable. Full tracing is based on the GraphQL java implementation, and can be enabled in the application.yml or application.properties file: the default value is false, with "metrics-only" being available. Metrics-only does not add the tracing extension to the response.

However even if I set the value to metrics-only the extensions object is included.

graphql:
  servlet:
    mapping: /api/graphql
    enabled: true
    exception-handlers-enabled: true
    actuator-metrics: true
    tracing-enabled: metrics-only

The only way to disable the "extensions" part of the reponse object is by disabling graphql.servlet.actuator-metrics: false all together which is not desirable as we wish to produce actuator metrics.

Expected behavior

When setting the config paramter graphql.servlet.tracing-enabled: metrics-only the response from the servlet should not include the "extensions" object.

If applicable, add screenshots to help explain your problem.
MacOS Sonoma
Java17
Intellij
Spring Boot 3.1.4

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions