Package io.sentry.graphql
Class SentryInstrumentation
java.lang.Object
graphql.execution.instrumentation.SimpleInstrumentation
io.sentry.graphql.SentryInstrumentation
- All Implemented Interfaces:
graphql.execution.instrumentation.Instrumentation
public final class SentryInstrumentation
extends graphql.execution.instrumentation.SimpleInstrumentation
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceDeprecated. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final @NotNull StringDeprecated.please useSentryGraphqlInstrumentation.SENTRY_EXCEPTIONS_CONTEXT_KEYstatic final @NotNull StringDeprecated.please useSentryGraphqlInstrumentation.SENTRY_SCOPES_CONTEXT_KEYFields inherited from class graphql.execution.instrumentation.SimpleInstrumentation
INSTANCE -
Constructor Summary
ConstructorsConstructorDescriptionSentryInstrumentation(@NotNull io.sentry.graphql.SentrySubscriptionHandler subscriptionHandler, boolean captureRequestBodyForNonSubscriptions) SentryInstrumentation(io.sentry.graphql.SentryGraphqlInstrumentation.BeforeSpanCallback beforeSpan, @NotNull io.sentry.graphql.SentrySubscriptionHandler subscriptionHandler, boolean captureRequestBodyForNonSubscriptions) SentryInstrumentation(io.sentry.graphql.SentryGraphqlInstrumentation.BeforeSpanCallback beforeSpan, @NotNull io.sentry.graphql.SentrySubscriptionHandler subscriptionHandler, boolean captureRequestBodyForNonSubscriptions, @NotNull List<String> ignoredErrorTypes) SentryInstrumentation(io.sentry.graphql.SentryGraphqlInstrumentation.BeforeSpanCallback beforeSpan, @NotNull io.sentry.graphql.SentrySubscriptionHandler subscriptionHandler, @NotNull io.sentry.graphql.ExceptionReporter exceptionReporter, @NotNull List<String> ignoredErrorTypes) -
Method Summary
Modifier and TypeMethodDescription@NotNull graphql.execution.instrumentation.InstrumentationContext<graphql.ExecutionResult>beginExecuteOperation(@NotNull graphql.execution.instrumentation.parameters.InstrumentationExecuteOperationParameters parameters) @NotNull graphql.execution.instrumentation.InstrumentationContext<graphql.ExecutionResult>beginExecution(@NotNull graphql.execution.instrumentation.parameters.InstrumentationExecutionParameters parameters) @NotNull graphql.execution.instrumentation.InstrumentationState@NotNull graphql.schema.DataFetcher<?>instrumentDataFetcher(@NotNull graphql.schema.DataFetcher<?> dataFetcher, @NotNull graphql.execution.instrumentation.parameters.InstrumentationFieldFetchParameters parameters) CompletableFuture<graphql.ExecutionResult>instrumentExecutionResult(graphql.ExecutionResult executionResult, graphql.execution.instrumentation.parameters.InstrumentationExecutionParameters parameters) Methods inherited from class graphql.execution.instrumentation.SimpleInstrumentation
beginExecutionStrategy, beginField, beginFieldFetch, beginParse, beginValidationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface graphql.execution.instrumentation.Instrumentation
beginFieldComplete, beginFieldListComplete, beginSubscribedFieldEvent, createState, instrumentDocumentAndVariables, instrumentExecutionContext, instrumentExecutionInput, instrumentSchema
-
Field Details
-
SENTRY_SCOPES_CONTEXT_KEY
Deprecated.please useSentryGraphqlInstrumentation.SENTRY_SCOPES_CONTEXT_KEY- See Also:
-
SENTRY_EXCEPTIONS_CONTEXT_KEY
Deprecated.please useSentryGraphqlInstrumentation.SENTRY_EXCEPTIONS_CONTEXT_KEY- See Also:
-
-
Constructor Details
-
SentryInstrumentation
public SentryInstrumentation(@Nullable io.sentry.graphql.SentryGraphqlInstrumentation.BeforeSpanCallback beforeSpan, @NotNull @NotNull io.sentry.graphql.SentrySubscriptionHandler subscriptionHandler, boolean captureRequestBodyForNonSubscriptions) - 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.
-
SentryInstrumentation
public SentryInstrumentation(@Nullable io.sentry.graphql.SentryGraphqlInstrumentation.BeforeSpanCallback beforeSpan, @NotNull @NotNull io.sentry.graphql.SentrySubscriptionHandler subscriptionHandler, boolean captureRequestBodyForNonSubscriptions, @NotNull @NotNull List<String> ignoredErrorTypes) - 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
-
SentryInstrumentation
@TestOnly public SentryInstrumentation(@Nullable io.sentry.graphql.SentryGraphqlInstrumentation.BeforeSpanCallback beforeSpan, @NotNull @NotNull io.sentry.graphql.SentrySubscriptionHandler subscriptionHandler, @NotNull @NotNull io.sentry.graphql.ExceptionReporter exceptionReporter, @NotNull @NotNull List<String> ignoredErrorTypes) -
SentryInstrumentation
public SentryInstrumentation(@NotNull @NotNull io.sentry.graphql.SentrySubscriptionHandler subscriptionHandler, boolean captureRequestBodyForNonSubscriptions) - Parameters:
subscriptionHandler- 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.
-
-
Method Details
-
createState
@NotNull public @NotNull graphql.execution.instrumentation.InstrumentationState createState() -
beginExecution
@NotNull public @NotNull graphql.execution.instrumentation.InstrumentationContext<graphql.ExecutionResult> beginExecution(@NotNull @NotNull graphql.execution.instrumentation.parameters.InstrumentationExecutionParameters parameters) - Specified by:
beginExecutionin interfacegraphql.execution.instrumentation.Instrumentation- Overrides:
beginExecutionin classgraphql.execution.instrumentation.SimpleInstrumentation
-
instrumentExecutionResult
public CompletableFuture<graphql.ExecutionResult> instrumentExecutionResult(graphql.ExecutionResult executionResult, graphql.execution.instrumentation.parameters.InstrumentationExecutionParameters parameters) -
beginExecuteOperation
@NotNull public @NotNull graphql.execution.instrumentation.InstrumentationContext<graphql.ExecutionResult> beginExecuteOperation(@NotNull @NotNull graphql.execution.instrumentation.parameters.InstrumentationExecuteOperationParameters parameters) - Specified by:
beginExecuteOperationin interfacegraphql.execution.instrumentation.Instrumentation- Overrides:
beginExecuteOperationin classgraphql.execution.instrumentation.SimpleInstrumentation
-
instrumentDataFetcher
@NotNull public @NotNull graphql.schema.DataFetcher<?> instrumentDataFetcher(@NotNull @NotNull graphql.schema.DataFetcher<?> dataFetcher, @NotNull @NotNull graphql.execution.instrumentation.parameters.InstrumentationFieldFetchParameters parameters)
-
SentryGraphqlInstrumentation.BeforeSpanCallback