Open steam0 opened 1 year ago
this is fixed by this: https://github.com/graphql-java-kickstart/graphql-spring-boot/commit/4c5a3e075bfc93b9f239b80cc7d834c9983f4c94
It hasn't been released yet though.
In the mean time, you can add these spring beans as a workaround:
@Bean
@ConditionalOnExpression(
"'${graphql.servlet.tracing-enabled:false}' == 'metrics-only' "
+ "|| '${graphql.servlet.tracing-enabled:false}' == 'true'"
)
public TracingInstrumentation tracingInstrumentation() {
return new TracingInstrumentation();
}
@Bean
@ConditionalOnProperty(value = "graphql.servlet.actuator-metrics", havingValue = "true")
public MetricsInstrumentation metricsInstrumentation(
MeterRegistry meterRegistry,
@Value("${graphql.servlet.tracing-enabled}") String isTracingEnabled
) {
return new MetricsInstrumentation(meterRegistry, Boolean.TRUE.toString().equalsIgnoreCase(isTracingEnabled)) {
@Override
public @NotNull CompletableFuture<ExecutionResult> instrumentExecutionResult(ExecutionResult executionResult, InstrumentationExecutionParameters parameters, InstrumentationState rawState) {
return super.instrumentExecutionResult(executionResult, parameters);
}
};
}
Thank you @bsara.
When do you think the new release will ship?
I don't control that, so I have no idea. Sorry.
I've released v15.1.0 today
Describe the bug
I am in the progress of upgrading to version 15 of the following dependency
When I do that I get an
extensions
object in my response like the one below: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
However even if I set the value to
metrics-only
the extensions object is included.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