Class SentryGraphqlInstrumentation

java.lang.Object
io.sentry.graphql.SentryGraphqlInstrumentation

public final class SentryGraphqlInstrumentation extends Object
  • Field Details

    • SENTRY_SCOPES_CONTEXT_KEY

      @NotNull public static final @NotNull String SENTRY_SCOPES_CONTEXT_KEY
      See Also:
    • SENTRY_EXCEPTIONS_CONTEXT_KEY

      @NotNull public static final @NotNull String 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 created
      subscriptionHandler - can report subscription errors
      captureRequestBodyForNonSubscriptions - 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)