Package io.sentry.graphql22
Class SentryInstrumentation
java.lang.Object
graphql.execution.instrumentation.SimplePerformantInstrumentation
io.sentry.graphql22.SentryInstrumentation
- All Implemented Interfaces:
graphql.execution.instrumentation.Instrumentation
public final class SentryInstrumentation
extends graphql.execution.instrumentation.SimplePerformantInstrumentation
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Deprecated. -
Field Summary
Modifier and TypeFieldDescriptionstatic final @NotNull String
Deprecated.static final @NotNull String
Deprecated.Fields inherited from class graphql.execution.instrumentation.SimplePerformantInstrumentation
INSTANCE
-
Constructor Summary
ConstructorDescriptionSentryInstrumentation
(@NotNull SentrySubscriptionHandler subscriptionHandler, boolean captureRequestBodyForNonSubscriptions) SentryInstrumentation
(SentryGraphqlInstrumentation.BeforeSpanCallback beforeSpan, @NotNull SentrySubscriptionHandler subscriptionHandler, boolean captureRequestBodyForNonSubscriptions) SentryInstrumentation
(SentryGraphqlInstrumentation.BeforeSpanCallback beforeSpan, @NotNull SentrySubscriptionHandler subscriptionHandler, boolean captureRequestBodyForNonSubscriptions, @NotNull List<String> ignoredErrorTypes) SentryInstrumentation
(SentryGraphqlInstrumentation.BeforeSpanCallback beforeSpan, @NotNull SentrySubscriptionHandler subscriptionHandler, @NotNull ExceptionReporter exceptionReporter, @NotNull List<String> ignoredErrorTypes) -
Method Summary
Modifier and TypeMethodDescription@Nullable graphql.execution.instrumentation.InstrumentationContext<graphql.ExecutionResult>
beginExecuteOperation
(@NotNull graphql.execution.instrumentation.parameters.InstrumentationExecuteOperationParameters parameters, @NotNull graphql.execution.instrumentation.InstrumentationState state) @Nullable graphql.execution.instrumentation.InstrumentationContext<graphql.ExecutionResult>
beginExecution
(@NotNull graphql.execution.instrumentation.parameters.InstrumentationExecutionParameters parameters, @NotNull graphql.execution.instrumentation.InstrumentationState state) @NotNull graphql.execution.instrumentation.InstrumentationState
createState
(@NotNull graphql.execution.instrumentation.parameters.InstrumentationCreateStateParameters parameters) @NotNull graphql.schema.DataFetcher<?>
instrumentDataFetcher
(@NotNull graphql.schema.DataFetcher<?> dataFetcher, @NotNull graphql.execution.instrumentation.parameters.InstrumentationFieldFetchParameters parameters, @NotNull graphql.execution.instrumentation.InstrumentationState state) @NotNull CompletableFuture<graphql.ExecutionResult>
instrumentExecutionResult
(@NotNull graphql.ExecutionResult executionResult, @NotNull graphql.execution.instrumentation.parameters.InstrumentationExecutionParameters parameters, @NotNull graphql.execution.instrumentation.InstrumentationState state) Methods inherited from class graphql.execution.instrumentation.SimplePerformantInstrumentation
beginExecuteObject, beginExecutionStrategy, beginFieldCompletion, beginFieldExecution, beginFieldFetch, beginFieldListCompletion, beginParse, beginSubscribedFieldEvent, beginValidation, createStateAsync, instrumentDocumentAndVariables, instrumentExecutionContext, instrumentExecutionInput, instrumentSchema
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface graphql.execution.instrumentation.Instrumentation
beginExecuteOperation, beginExecution, beginExecutionStrategy, beginField, beginFieldComplete, beginFieldFetch, beginFieldListComplete, beginParse, beginSubscribedFieldEvent, beginValidation, createState, instrumentDataFetcher, instrumentDocumentAndVariables, instrumentExecutionContext, instrumentExecutionInput, instrumentExecutionResult, instrumentSchema
-
Field Details
-
SENTRY_SCOPES_CONTEXT_KEY
Deprecated.- See Also:
-
SENTRY_EXCEPTIONS_CONTEXT_KEY
Deprecated.- See Also:
-
-
Constructor Details
-
SentryInstrumentation
public SentryInstrumentation(@Nullable SentryGraphqlInstrumentation.BeforeSpanCallback beforeSpan, @NotNull @NotNull 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 SentryGraphqlInstrumentation.BeforeSpanCallback beforeSpan, @NotNull @NotNull 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 SentryGraphqlInstrumentation.BeforeSpanCallback beforeSpan, @NotNull @NotNull SentrySubscriptionHandler subscriptionHandler, @NotNull @NotNull ExceptionReporter exceptionReporter, @NotNull @NotNull List<String> ignoredErrorTypes) -
SentryInstrumentation
public SentryInstrumentation(@NotNull @NotNull 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(@NotNull @NotNull graphql.execution.instrumentation.parameters.InstrumentationCreateStateParameters parameters) - Specified by:
createState
in interfacegraphql.execution.instrumentation.Instrumentation
- Overrides:
createState
in classgraphql.execution.instrumentation.SimplePerformantInstrumentation
-
beginExecution
@Nullable public @Nullable graphql.execution.instrumentation.InstrumentationContext<graphql.ExecutionResult> beginExecution(@NotNull @NotNull graphql.execution.instrumentation.parameters.InstrumentationExecutionParameters parameters, @NotNull @NotNull graphql.execution.instrumentation.InstrumentationState state) - Overrides:
beginExecution
in classgraphql.execution.instrumentation.SimplePerformantInstrumentation
-
instrumentExecutionResult
@NotNull public @NotNull CompletableFuture<graphql.ExecutionResult> instrumentExecutionResult(@NotNull @NotNull graphql.ExecutionResult executionResult, @NotNull @NotNull graphql.execution.instrumentation.parameters.InstrumentationExecutionParameters parameters, @NotNull @NotNull graphql.execution.instrumentation.InstrumentationState state) - Overrides:
instrumentExecutionResult
in classgraphql.execution.instrumentation.SimplePerformantInstrumentation
-
beginExecuteOperation
@Nullable public @Nullable graphql.execution.instrumentation.InstrumentationContext<graphql.ExecutionResult> beginExecuteOperation(@NotNull @NotNull graphql.execution.instrumentation.parameters.InstrumentationExecuteOperationParameters parameters, @NotNull @NotNull graphql.execution.instrumentation.InstrumentationState state) - Overrides:
beginExecuteOperation
in classgraphql.execution.instrumentation.SimplePerformantInstrumentation
-
instrumentDataFetcher
@NotNull public @NotNull graphql.schema.DataFetcher<?> instrumentDataFetcher(@NotNull @NotNull graphql.schema.DataFetcher<?> dataFetcher, @NotNull @NotNull graphql.execution.instrumentation.parameters.InstrumentationFieldFetchParameters parameters, @NotNull @NotNull graphql.execution.instrumentation.InstrumentationState state) - Overrides:
instrumentDataFetcher
in classgraphql.execution.instrumentation.SimplePerformantInstrumentation
-
SentryGraphqlInstrumentation.BeforeSpanCallback