public static class FederatedTracingInstrumentation.Options
extends java.lang.Object
| Constructor and Description |
|---|
Options(boolean debuggingEnabled) |
Options(boolean debuggingEnabled,
@Nullable java.util.function.Predicate<graphql.ExecutionInput> shouldTracePredicate)
Configuration options for federated tracing.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isDebuggingEnabled() |
static @NotNull FederatedTracingInstrumentation.Options |
newOptions() |
boolean |
shouldTrace(graphql.ExecutionInput executionInput) |
public Options(boolean debuggingEnabled,
@Nullable
@Nullable java.util.function.Predicate<graphql.ExecutionInput> shouldTracePredicate)
debuggingEnabled - Enables debug logging of the generated trace (default: false).shouldTracePredicate - Predicate that controls whether to generate a trace for a given
request (default: null). Note that when Apollo Gateway provides an HTTP header with name
"apollo-federation-include-trace" and value "ftv1", you must enable tracing for the
request, and it is your responsibility to augment your ExecutionInput or its
context to contain the information necessary for this predicate to have the above
behavior. The default/null behavior is to enable trace generation unless the
GraphQLContext map contains "apollo-federation-include-trace" entry with a value other
than "ftv1" or if (deprecated) context both implements HTTPRequestHeaders and
calling HTTPRequestHeaders.getHTTPRequestHeader(String) with
"apollo-federation-include-trace" returns a value that is null or isn't "ftv1".public Options(boolean debuggingEnabled)
@NotNull public static @NotNull FederatedTracingInstrumentation.Options newOptions()
public boolean isDebuggingEnabled()
public boolean shouldTrace(graphql.ExecutionInput executionInput)