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
-
Field Summary
Fields inherited from class graphql.execution.instrumentation.SimpleInstrumentation
INSTANCE
-
Constructor Summary
ConstructorDescriptionDeprecated.SentryInstrumentation
(@NotNull SentrySubscriptionHandler subscriptionHandler, boolean captureRequestBodyForNonSubscriptions) SentryInstrumentation
(@Nullable SentryInstrumentation.BeforeSpanCallback beforeSpan) Deprecated.please use a constructor that takes aSentrySubscriptionHandler
instead.SentryInstrumentation
(@Nullable SentryInstrumentation.BeforeSpanCallback beforeSpan, @NotNull SentrySubscriptionHandler subscriptionHandler, boolean captureRequestBodyForNonSubscriptions) SentryInstrumentation
(@Nullable SentryInstrumentation.BeforeSpanCallback beforeSpan, @NotNull SentrySubscriptionHandler subscriptionHandler, boolean captureRequestBodyForNonSubscriptions, @NotNull List<String> ignoredErrorTypes) SentryInstrumentation
(@Nullable SentryInstrumentation.BeforeSpanCallback beforeSpan, @NotNull SentrySubscriptionHandler subscriptionHandler, @NotNull ExceptionReporter exceptionReporter, @NotNull List<String> ignoredErrorTypes) SentryInstrumentation
(@Nullable IHub hub) Deprecated.please use a constructor that takes aSentrySubscriptionHandler
instead.SentryInstrumentation
(@Nullable IHub hub, @Nullable SentryInstrumentation.BeforeSpanCallback beforeSpan) Deprecated.please use a constructor that takes aSentrySubscriptionHandler
instead. -
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, beginValidation
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
beginFieldComplete, beginFieldListComplete, beginSubscribedFieldEvent, createState, instrumentDocumentAndVariables, instrumentExecutionContext, instrumentExecutionInput, instrumentSchema
-
Field Details
-
SENTRY_HUB_CONTEXT_KEY
- See Also:
-
SENTRY_EXCEPTIONS_CONTEXT_KEY
- See Also:
-
-
Constructor Details
-
SentryInstrumentation
Deprecated.please use a constructor that takes aSentrySubscriptionHandler
instead. -
SentryInstrumentation
Deprecated.please use a constructor that takes aSentrySubscriptionHandler
instead. -
SentryInstrumentation
@Deprecated public SentryInstrumentation(@Nullable @Nullable SentryInstrumentation.BeforeSpanCallback beforeSpan) Deprecated.please use a constructor that takes aSentrySubscriptionHandler
instead. -
SentryInstrumentation
@Deprecated public SentryInstrumentation(@Nullable @Nullable IHub hub, @Nullable @Nullable SentryInstrumentation.BeforeSpanCallback beforeSpan) Deprecated.please use a constructor that takes aSentrySubscriptionHandler
instead. -
SentryInstrumentation
public SentryInstrumentation(@Nullable @Nullable SentryInstrumentation.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 @Nullable SentryInstrumentation.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 @Nullable SentryInstrumentation.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() -
beginExecution
@NotNull public @NotNull graphql.execution.instrumentation.InstrumentationContext<graphql.ExecutionResult> beginExecution(@NotNull @NotNull graphql.execution.instrumentation.parameters.InstrumentationExecutionParameters parameters) - Specified by:
beginExecution
in interfacegraphql.execution.instrumentation.Instrumentation
- Overrides:
beginExecution
in 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:
beginExecuteOperation
in interfacegraphql.execution.instrumentation.Instrumentation
- Overrides:
beginExecuteOperation
in 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)
-
SentrySubscriptionHandler
instead.