Package io.sentry.graphql
Class SentryGraphqlInstrumentation
java.lang.Object
io.sentry.graphql.SentryGraphqlInstrumentation
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static final class
-
Field Summary
-
Constructor Summary
ConstructorDescriptionSentryGraphqlInstrumentation
(@Nullable SentryGraphqlInstrumentation.BeforeSpanCallback beforeSpan, @NotNull SentrySubscriptionHandler subscriptionHandler, boolean captureRequestBodyForNonSubscriptions, @NotNull List<String> ignoredErrorTypes, @NotNull String traceOrigin) SentryGraphqlInstrumentation
(@Nullable SentryGraphqlInstrumentation.BeforeSpanCallback beforeSpan, @NotNull SentrySubscriptionHandler subscriptionHandler, @NotNull ExceptionReporter exceptionReporter, @NotNull List<String> ignoredErrorTypes, @NotNull String traceOrigin) -
Method Summary
Modifier and TypeMethodDescriptionvoid
beginExecuteOperation
(@NotNull graphql.execution.instrumentation.parameters.InstrumentationExecuteOperationParameters parameters) void
beginExecution
(@NotNull graphql.execution.instrumentation.parameters.InstrumentationExecutionParameters parameters, @NotNull SentryGraphqlInstrumentation.TracingState tracingState) @NotNull graphql.execution.instrumentation.InstrumentationState
@NotNull graphql.schema.DataFetcher<?>
instrumentDataFetcher
(@NotNull graphql.schema.DataFetcher<?> dataFetcher, @NotNull graphql.execution.instrumentation.parameters.InstrumentationFieldFetchParameters parameters, @NotNull SentryGraphqlInstrumentation.TracingState tracingState) void
instrumentExecutionResultComplete
(@NotNull graphql.execution.instrumentation.parameters.InstrumentationExecutionParameters parameters, @Nullable graphql.ExecutionResult result, @Nullable Throwable exception)
-
Field Details
-
SENTRY_SCOPES_CONTEXT_KEY
- See Also:
-
SENTRY_EXCEPTIONS_CONTEXT_KEY
- See Also:
-
-
Constructor Details
-
SentryGraphqlInstrumentation
public SentryGraphqlInstrumentation(@Nullable @Nullable SentryGraphqlInstrumentation.BeforeSpanCallback beforeSpan, @NotNull @NotNull SentrySubscriptionHandler subscriptionHandler, boolean captureRequestBodyForNonSubscriptions, @NotNull @NotNull List<String> ignoredErrorTypes, @NotNull @NotNull String traceOrigin) - Parameters:
beforeSpan
- callback when a span is createdsubscriptionHandler
- can report subscription errorscaptureRequestBodyForNonSubscriptions
- false if request bodies should not be captured by this integration for query and mutation operations. This can be used to prevent unnecessary work by not adding the request body when another integration will add it anyways, as is the case with our spring integration for WebMVC.ignoredErrorTypes
- list of error types that should not be captured and sent to Sentry
-
SentryGraphqlInstrumentation
@TestOnly public SentryGraphqlInstrumentation(@Nullable @Nullable SentryGraphqlInstrumentation.BeforeSpanCallback beforeSpan, @NotNull @NotNull SentrySubscriptionHandler subscriptionHandler, @NotNull @NotNull ExceptionReporter exceptionReporter, @NotNull @NotNull List<String> ignoredErrorTypes, @NotNull @NotNull String traceOrigin)
-
-
Method Details
-
createState
@NotNull public @NotNull graphql.execution.instrumentation.InstrumentationState createState() -
beginExecution
public void beginExecution(@NotNull @NotNull graphql.execution.instrumentation.parameters.InstrumentationExecutionParameters parameters, @NotNull @NotNull SentryGraphqlInstrumentation.TracingState tracingState) -
instrumentExecutionResultComplete
public void instrumentExecutionResultComplete(@NotNull @NotNull graphql.execution.instrumentation.parameters.InstrumentationExecutionParameters parameters, @Nullable @Nullable graphql.ExecutionResult result, @Nullable @Nullable Throwable exception) -
beginExecuteOperation
public void beginExecuteOperation(@NotNull @NotNull graphql.execution.instrumentation.parameters.InstrumentationExecuteOperationParameters parameters) -
instrumentDataFetcher
@NotNull public @NotNull graphql.schema.DataFetcher<?> instrumentDataFetcher(@NotNull @NotNull graphql.schema.DataFetcher<?> dataFetcher, @NotNull @NotNull graphql.execution.instrumentation.parameters.InstrumentationFieldFetchParameters parameters, @NotNull @NotNull SentryGraphqlInstrumentation.TracingState tracingState)
-